<?php
	/**
	 * The abstract TableTransactionGen class defined here is
	 * code-generated and contains all the basic CRUD-type functionality as well as
	 * basic methods to handle relationships and index-based loading.
	 *
	 * To use, you should use the TableTransaction subclass which
	 * extends this TableTransactionGen class.
	 *
	 * Because subsequent re-code generations will overwrite any changes to this
	 * file, you should leave this file unaltered to prevent yourself from losing
	 * any information or code changes.  All customizations should be done by
	 * overriding existing or implementing new methods, properties and variables
	 * in the TableTransaction class.
	 * 
	 * @package My Application
	 * @subpackage GeneratedDataObjects
	 * @property-read integer $Id the value for intId (Read-Only PK)
	 * @property integer $UserId the value for intUserId (Not Null)
	 * @property integer $ProjectId the value for intProjectId 
	 * @property integer $ItemGetId the value for intItemGetId 
	 * @property integer $PointInId the value for intPointInId 
	 * @property integer $PointOutId the value for intPointOutId 
	 * @property integer $EscrowId the value for intEscrowId 
	 * @property integer $Currency the value for intCurrency 
	 * @property integer $BalanceBefore the value for intBalanceBefore 
	 * @property integer $BalanceAfter the value for intBalanceAfter 
	 * @property integer $Amount the value for intAmount 
	 * @property QDateTime $TransactionDate the value for dttTransactionDate 
	 * @property integer $Type the value for intType (Not Null)
	 * @property string $Description the value for strDescription (Not Null)
	 * @property string $Active the value for strActive (Not Null)
	 * @property string $Ip the value for strIp 
	 * @property string $PointChargedId the value for strPointChargedId (Not Null)
	 * @property TableUserProject $User the value for the TableUserProject object referenced by intUserId (Not Null)
	 * @property TableProject $Project the value for the TableProject object referenced by intProjectId 
	 * @property TableItemGet $ItemGet the value for the TableItemGet object referenced by intItemGetId 
	 * @property TablePointIn $PointIn the value for the TablePointIn object referenced by intPointInId 
	 * @property TablePointOut $PointOut the value for the TablePointOut object referenced by intPointOutId 
	 * @property TableEscrow $Escrow the value for the TableEscrow object referenced by intEscrowId 
	 * @property-read TableBankRequestIn $_TableBankRequestInAsTransaction the value for the private _objTableBankRequestInAsTransaction (Read-Only) if set due to an expansion on the table_bank_request_in.transaction_id reverse relationship
	 * @property-read TableBankRequestIn[] $_TableBankRequestInAsTransactionArray the value for the private _objTableBankRequestInAsTransactionArray (Read-Only) if set due to an ExpandAsArray on the table_bank_request_in.transaction_id reverse relationship
	 * @property-read TableBankRequestIn $_TableBankRequestInAsProcessTransaction the value for the private _objTableBankRequestInAsProcessTransaction (Read-Only) if set due to an expansion on the table_bank_request_in.process_transaction_id reverse relationship
	 * @property-read TableBankRequestIn[] $_TableBankRequestInAsProcessTransactionArray the value for the private _objTableBankRequestInAsProcessTransactionArray (Read-Only) if set due to an ExpandAsArray on the table_bank_request_in.process_transaction_id reverse relationship
	 * @property-read TableBankRequestOut $_TableBankRequestOutAsTransaction the value for the private _objTableBankRequestOutAsTransaction (Read-Only) if set due to an expansion on the table_bank_request_out.transaction_id reverse relationship
	 * @property-read TableBankRequestOut[] $_TableBankRequestOutAsTransactionArray the value for the private _objTableBankRequestOutAsTransactionArray (Read-Only) if set due to an ExpandAsArray on the table_bank_request_out.transaction_id reverse relationship
	 * @property-read TableBankRequestOut $_TableBankRequestOutAsProcessTransaction the value for the private _objTableBankRequestOutAsProcessTransaction (Read-Only) if set due to an expansion on the table_bank_request_out.process_transaction_id reverse relationship
	 * @property-read TableBankRequestOut[] $_TableBankRequestOutAsProcessTransactionArray the value for the private _objTableBankRequestOutAsProcessTransactionArray (Read-Only) if set due to an ExpandAsArray on the table_bank_request_out.process_transaction_id reverse relationship
	 * @property-read boolean $__Restored whether or not this object was restored from the database (as opposed to created new)
	 */
	class TableTransactionGen extends QBaseClass {

		///////////////////////////////////////////////////////////////////////
		// PROTECTED MEMBER VARIABLES and TEXT FIELD MAXLENGTHS (if applicable)
		///////////////////////////////////////////////////////////////////////
		
		/**
		 * Protected member variable that maps to the database PK Identity column table_transaction.id
		 * @var integer intId
		 */
		protected $intId;
		const IdDefault = 0;


		/**
		 * Protected member variable that maps to the database column table_transaction.user_id
		 * @var integer intUserId
		 */
		protected $intUserId;
		const UserIdDefault = 0;


		/**
		 * Protected member variable that maps to the database column table_transaction.project_id
		 * @var integer intProjectId
		 */
		protected $intProjectId;
		const ProjectIdDefault = 0;


		/**
		 * Protected member variable that maps to the database column table_transaction.item_get_id
		 * @var integer intItemGetId
		 */
		protected $intItemGetId;
		const ItemGetIdDefault = 0;


		/**
		 * Protected member variable that maps to the database column table_transaction.point_in_id
		 * @var integer intPointInId
		 */
		protected $intPointInId;
		const PointInIdDefault = 0;


		/**
		 * Protected member variable that maps to the database column table_transaction.point_out_id
		 * @var integer intPointOutId
		 */
		protected $intPointOutId;
		const PointOutIdDefault = 0;


		/**
		 * Protected member variable that maps to the database column table_transaction.escrow_id
		 * @var integer intEscrowId
		 */
		protected $intEscrowId;
		const EscrowIdDefault = 0;


		/**
		 * Protected member variable that maps to the database column table_transaction.currency
		 * @var integer intCurrency
		 */
		protected $intCurrency;
		const CurrencyDefault = 0;


		/**
		 * Protected member variable that maps to the database column table_transaction.balance_before
		 * @var integer intBalanceBefore
		 */
		protected $intBalanceBefore;
		const BalanceBeforeDefault = 0;


		/**
		 * Protected member variable that maps to the database column table_transaction.balance_after
		 * @var integer intBalanceAfter
		 */
		protected $intBalanceAfter;
		const BalanceAfterDefault = 0;


		/**
		 * Protected member variable that maps to the database column table_transaction.amount
		 * @var integer intAmount
		 */
		protected $intAmount;
		const AmountDefault = 0;


		/**
		 * Protected member variable that maps to the database column table_transaction.transaction_date
		 * @var QDateTime dttTransactionDate
		 */
		protected $dttTransactionDate;
		const TransactionDateDefault = null;


		/**
		 * Protected member variable that maps to the database column table_transaction.type
		 * @var integer intType
		 */
		protected $intType;
		const TypeDefault = 0;


		/**
		 * Protected member variable that maps to the database column table_transaction.description
		 * @var string strDescription
		 */
		protected $strDescription;
		const DescriptionMaxLength = 200;
		const DescriptionDefault = null;


		/**
		 * Protected member variable that maps to the database column table_transaction.active
		 * @var string strActive
		 */
		protected $strActive;
		const ActiveMaxLength = 1;
		const ActiveDefault = null;


		/**
		 * Protected member variable that maps to the database column table_transaction.ip
		 * @var string strIp
		 */
		protected $strIp;
		const IpMaxLength = 30;
		const IpDefault = null;


		/**
		 * Protected member variable that maps to the database column table_transaction.point_charged_id
		 * @var string strPointChargedId
		 */
		protected $strPointChargedId;
		const PointChargedIdMaxLength = 45;
		const PointChargedIdDefault = null;


		/**
		 * Private member variable that stores a reference to a single TableBankRequestInAsTransaction object
		 * (of type TableBankRequestIn), if this TableTransaction object was restored with
		 * an expansion on the table_bank_request_in association table.
		 * @var TableBankRequestIn _objTableBankRequestInAsTransaction;
		 */
		private $_objTableBankRequestInAsTransaction;

		/**
		 * Private member variable that stores a reference to an array of TableBankRequestInAsTransaction objects
		 * (of type TableBankRequestIn[]), if this TableTransaction object was restored with
		 * an ExpandAsArray on the table_bank_request_in association table.
		 * @var TableBankRequestIn[] _objTableBankRequestInAsTransactionArray;
		 */
		private $_objTableBankRequestInAsTransactionArray = array();

		/**
		 * Private member variable that stores a reference to a single TableBankRequestInAsProcessTransaction object
		 * (of type TableBankRequestIn), if this TableTransaction object was restored with
		 * an expansion on the table_bank_request_in association table.
		 * @var TableBankRequestIn _objTableBankRequestInAsProcessTransaction;
		 */
		private $_objTableBankRequestInAsProcessTransaction;

		/**
		 * Private member variable that stores a reference to an array of TableBankRequestInAsProcessTransaction objects
		 * (of type TableBankRequestIn[]), if this TableTransaction object was restored with
		 * an ExpandAsArray on the table_bank_request_in association table.
		 * @var TableBankRequestIn[] _objTableBankRequestInAsProcessTransactionArray;
		 */
		private $_objTableBankRequestInAsProcessTransactionArray = array();

		/**
		 * Private member variable that stores a reference to a single TableBankRequestOutAsTransaction object
		 * (of type TableBankRequestOut), if this TableTransaction object was restored with
		 * an expansion on the table_bank_request_out association table.
		 * @var TableBankRequestOut _objTableBankRequestOutAsTransaction;
		 */
		private $_objTableBankRequestOutAsTransaction;

		/**
		 * Private member variable that stores a reference to an array of TableBankRequestOutAsTransaction objects
		 * (of type TableBankRequestOut[]), if this TableTransaction object was restored with
		 * an ExpandAsArray on the table_bank_request_out association table.
		 * @var TableBankRequestOut[] _objTableBankRequestOutAsTransactionArray;
		 */
		private $_objTableBankRequestOutAsTransactionArray = array();

		/**
		 * Private member variable that stores a reference to a single TableBankRequestOutAsProcessTransaction object
		 * (of type TableBankRequestOut), if this TableTransaction object was restored with
		 * an expansion on the table_bank_request_out association table.
		 * @var TableBankRequestOut _objTableBankRequestOutAsProcessTransaction;
		 */
		private $_objTableBankRequestOutAsProcessTransaction;

		/**
		 * Private member variable that stores a reference to an array of TableBankRequestOutAsProcessTransaction objects
		 * (of type TableBankRequestOut[]), if this TableTransaction object was restored with
		 * an ExpandAsArray on the table_bank_request_out association table.
		 * @var TableBankRequestOut[] _objTableBankRequestOutAsProcessTransactionArray;
		 */
		private $_objTableBankRequestOutAsProcessTransactionArray = array();

		/**
		 * Protected array of virtual attributes for this object (e.g. extra/other calculated and/or non-object bound
		 * columns from the run-time database query result for this object).  Used by InstantiateDbRow and
		 * GetVirtualAttribute.
		 * @var string[] $__strVirtualAttributeArray
		 */
		protected $__strVirtualAttributeArray = array();

		/**
		 * Protected internal member variable that specifies whether or not this object is Restored from the database.
		 * Used by Save() to determine if Save() should perform a db UPDATE or INSERT.
		 * @var bool __blnRestored;
		 */
		protected $__blnRestored;




		///////////////////////////////
		// PROTECTED MEMBER OBJECTS
		///////////////////////////////

		/**
		 * Protected member variable that contains the object pointed by the reference
		 * in the database column table_transaction.user_id.
		 *
		 * NOTE: Always use the User property getter to correctly retrieve this TableUserProject object.
		 * (Because this class implements late binding, this variable reference MAY be null.)
		 * @var TableUserProject objUser
		 */
		protected $objUser;

		/**
		 * Protected member variable that contains the object pointed by the reference
		 * in the database column table_transaction.project_id.
		 *
		 * NOTE: Always use the Project property getter to correctly retrieve this TableProject object.
		 * (Because this class implements late binding, this variable reference MAY be null.)
		 * @var TableProject objProject
		 */
		protected $objProject;

		/**
		 * Protected member variable that contains the object pointed by the reference
		 * in the database column table_transaction.item_get_id.
		 *
		 * NOTE: Always use the ItemGet property getter to correctly retrieve this TableItemGet object.
		 * (Because this class implements late binding, this variable reference MAY be null.)
		 * @var TableItemGet objItemGet
		 */
		protected $objItemGet;

		/**
		 * Protected member variable that contains the object pointed by the reference
		 * in the database column table_transaction.point_in_id.
		 *
		 * NOTE: Always use the PointIn property getter to correctly retrieve this TablePointIn object.
		 * (Because this class implements late binding, this variable reference MAY be null.)
		 * @var TablePointIn objPointIn
		 */
		protected $objPointIn;

		/**
		 * Protected member variable that contains the object pointed by the reference
		 * in the database column table_transaction.point_out_id.
		 *
		 * NOTE: Always use the PointOut property getter to correctly retrieve this TablePointOut object.
		 * (Because this class implements late binding, this variable reference MAY be null.)
		 * @var TablePointOut objPointOut
		 */
		protected $objPointOut;

		/**
		 * Protected member variable that contains the object pointed by the reference
		 * in the database column table_transaction.escrow_id.
		 *
		 * NOTE: Always use the Escrow property getter to correctly retrieve this TableEscrow object.
		 * (Because this class implements late binding, this variable reference MAY be null.)
		 * @var TableEscrow objEscrow
		 */
		protected $objEscrow;





		///////////////////////////////
		// CLASS-WIDE LOAD AND COUNT METHODS
		///////////////////////////////

		/**
		 * Static method to retrieve the Database object that owns this class.
		 * @return QDatabaseBase reference to the Database object that can query this class
		 */
		public static function GetDatabase() {
			return QApplication::$Database[1];
		}

		/**
		 * Load a TableTransaction from PK Info
		 * @param integer $intId
		 * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
		 * @return TableTransaction
		 */
		public static function Load($intId, $objOptionalClauses = null) {
			// Use QuerySingle to Perform the Query
			return TableTransaction::QuerySingle(
				QQ::AndCondition(
					QQ::Equal(QQN::TableTransaction()->Id, $intId)
				),
				$objOptionalClauses
			);
		}

		/**
		 * Load all TableTransactions
		 * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
		 * @return TableTransaction[]
		 */
		public static function LoadAll($objOptionalClauses = null) {
			if (func_num_args() > 1) {
				throw new QCallerException("LoadAll must be called with an array of optional clauses as a single argument");
			}
			// Call TableTransaction::QueryArray to perform the LoadAll query
			try {
				return TableTransaction::QueryArray(QQ::All(), $objOptionalClauses);
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * Count all TableTransactions
		 * @return int
		 */
		public static function CountAll() {
			// Call TableTransaction::QueryCount to perform the CountAll query
			return TableTransaction::QueryCount(QQ::All());
		}




		///////////////////////////////
		// QCUBED QUERY-RELATED METHODS
		///////////////////////////////

		/**
		 * Internally called method to assist with calling Qcubed Query for this class
		 * on load methods.
		 * @param QQueryBuilder &$objQueryBuilder the QueryBuilder object that will be created
		 * @param QQCondition $objConditions any conditions on the query, itself
		 * @param QQClause[] $objOptionalClausees additional optional QQClause object or array of QQClause objects for this query
		 * @param mixed[] $mixParameterArray a array of name-value pairs to perform PrepareStatement with (sending in null will skip the PrepareStatement step)
		 * @param boolean $blnCountOnly only select a rowcount
		 * @return string the query statement
		 */
		protected static function BuildQueryStatement(&$objQueryBuilder, QQCondition $objConditions, $objOptionalClauses, $mixParameterArray, $blnCountOnly) {
			// Get the Database Object for this Class
			$objDatabase = TableTransaction::GetDatabase();

			// Create/Build out the QueryBuilder object with TableTransaction-specific SELET and FROM fields
			$objQueryBuilder = new QQueryBuilder($objDatabase, 'table_transaction');
			TableTransaction::GetSelectFields($objQueryBuilder);
			$objQueryBuilder->AddFromItem('table_transaction');

			// Set "CountOnly" option (if applicable)
			if ($blnCountOnly)
				$objQueryBuilder->SetCountOnlyFlag();

			// Apply Any Conditions
			if ($objConditions)
				try {
					$objConditions->UpdateQueryBuilder($objQueryBuilder);
				} catch (QCallerException $objExc) {
					$objExc->IncrementOffset();
					throw $objExc;
				}

			// Iterate through all the Optional Clauses (if any) and perform accordingly
			if ($objOptionalClauses) {
				if ($objOptionalClauses instanceof QQClause)
					$objOptionalClauses->UpdateQueryBuilder($objQueryBuilder);
				else if (is_array($objOptionalClauses))
					foreach ($objOptionalClauses as $objClause)
						$objClause->UpdateQueryBuilder($objQueryBuilder);
				else
					throw new QCallerException('Optional Clauses must be a QQClause object or an array of QQClause objects');
			}

			// Get the SQL Statement
			$strQuery = $objQueryBuilder->GetStatement();

			// Prepare the Statement with the Query Parameters (if applicable)
			if ($mixParameterArray) {
				if (is_array($mixParameterArray)) {
					if (count($mixParameterArray))
						$strQuery = $objDatabase->PrepareStatement($strQuery, $mixParameterArray);

					// Ensure that there are no other Unresolved Named Parameters
					if (strpos($strQuery, chr(QQNamedValue::DelimiterCode) . '{') !== false)
						throw new QCallerException('Unresolved named parameters in the query');
				} else
					throw new QCallerException('Parameter Array must be an array of name-value parameter pairs');
			}

			// Return the Objects
			return $strQuery;
		}

		/**
		 * Static Qcubed Query method to query for a single TableTransaction object.
		 * Uses BuildQueryStatment to perform most of the work.
		 * @param QQCondition $objConditions any conditions on the query, itself
		 * @param QQClause[] $objOptionalClausees additional optional QQClause objects for this query
		 * @param mixed[] $mixParameterArray a array of name-value pairs to perform PrepareStatement with
		 * @return TableTransaction the queried object
		 */
		public static function QuerySingle(QQCondition $objConditions, $objOptionalClauses = null, $mixParameterArray = null) {
			// Get the Query Statement
			try {
				$strQuery = TableTransaction::BuildQueryStatement($objQueryBuilder, $objConditions, $objOptionalClauses, $mixParameterArray, false);
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
			
			// Perform the Query, Get the First Row, and Instantiate a new TableTransaction object
			$objDbResult = $objQueryBuilder->Database->Query($strQuery);
			
			// Do we have to expand anything?
			if ($objQueryBuilder->ExpandAsArrayNodes) {
				$objToReturn = array();
				while ($objDbRow = $objDbResult->GetNextRow()) {
					$objItem = TableTransaction::InstantiateDbRow($objDbRow, null, $objQueryBuilder->ExpandAsArrayNodes, $objToReturn, $objQueryBuilder->ColumnAliasArray);
					if ($objItem)
						$objToReturn[] = $objItem;					
				}			
				// Since we only want the object to return, lets return the object and not the array.
				return $objToReturn[0];
			} else {
				// No expands just return the first row
				$objToReturn = null;
				while ($objDbRow = $objDbResult->GetNextRow())
					$objToReturn = TableTransaction::InstantiateDbRow($objDbRow, null, null, null, $objQueryBuilder->ColumnAliasArray);
			}
			
			return $objToReturn;
		}

		/**
		 * Static Qcubed Query method to query for an array of TableTransaction objects.
		 * Uses BuildQueryStatment to perform most of the work.
		 * @param QQCondition $objConditions any conditions on the query, itself
		 * @param QQClause[] $objOptionalClausees additional optional QQClause objects for this query
		 * @param mixed[] $mixParameterArray a array of name-value pairs to perform PrepareStatement with
		 * @return TableTransaction[] the queried objects as an array
		 */
		public static function QueryArray(QQCondition $objConditions, $objOptionalClauses = null, $mixParameterArray = null) {
			// Get the Query Statement
			try {
				$strQuery = TableTransaction::BuildQueryStatement($objQueryBuilder, $objConditions, $objOptionalClauses, $mixParameterArray, false);
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}

			// Perform the Query and Instantiate the Array Result
			$objDbResult = $objQueryBuilder->Database->Query($strQuery);
			return TableTransaction::InstantiateDbResult($objDbResult, $objQueryBuilder->ExpandAsArrayNodes, $objQueryBuilder->ColumnAliasArray);
		}

		/**
		 * Static Qcubed Query method to query for a count of TableTransaction objects.
		 * Uses BuildQueryStatment to perform most of the work.
		 * @param QQCondition $objConditions any conditions on the query, itself
		 * @param QQClause[] $objOptionalClausees additional optional QQClause objects for this query
		 * @param mixed[] $mixParameterArray a array of name-value pairs to perform PrepareStatement with
		 * @return integer the count of queried objects as an integer
		 */
		public static function QueryCount(QQCondition $objConditions, $objOptionalClauses = null, $mixParameterArray = null) {
			// Get the Query Statement
			try {
				$strQuery = TableTransaction::BuildQueryStatement($objQueryBuilder, $objConditions, $objOptionalClauses, $mixParameterArray, true);
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}

			// Perform the Query and return the row_count
			$objDbResult = $objQueryBuilder->Database->Query($strQuery);

			// Figure out if the query is using GroupBy
			$blnGrouped = false;

			if ($objOptionalClauses) foreach ($objOptionalClauses as $objClause) {
				if ($objClause instanceof QQGroupBy) {
					$blnGrouped = true;
					break;
				}
			}

			if ($blnGrouped)
				// Groups in this query - return the count of Groups (which is the count of all rows)
				return $objDbResult->CountRows();
			else {
				// No Groups - return the sql-calculated count(*) value
				$strDbRow = $objDbResult->FetchRow();
				return QType::Cast($strDbRow[0], QType::Integer);
			}
		}

		public static function QueryArrayCached(QQCondition $objConditions, $objOptionalClauses = null, $mixParameterArray = null, $blnForceUpdate = false) {
			// Get the Database Object for this Class
			$objDatabase = TableTransaction::GetDatabase();

			$strQuery = TableTransaction::BuildQueryStatement($objQueryBuilder, $objConditions, $objOptionalClauses, $mixParameterArray, false);
			
			$objCache = new QCache('qquery/tabletransaction', $strQuery);
			$cacheData = $objCache->GetData();
			
			if (!$cacheData || $blnForceUpdate) {
				$objDbResult = $objQueryBuilder->Database->Query($strQuery);
				$arrResult = TableTransaction::InstantiateDbResult($objDbResult, $objQueryBuilder->ExpandAsArrayNodes, $objQueryBuilder->ColumnAliasArray);
				$objCache->SaveData(serialize($arrResult));
			} else {
				$arrResult = unserialize($cacheData);
			}
			
			return $arrResult;
		}

		/**
		 * Updates a QQueryBuilder with the SELECT fields for this TableTransaction
		 * @param QQueryBuilder $objBuilder the Query Builder object to update
		 * @param string $strPrefix optional prefix to add to the SELECT fields
		 */
		public static function GetSelectFields(QQueryBuilder $objBuilder, $strPrefix = null) {
			if ($strPrefix) {
				$strTableName = $strPrefix;
				$strAliasPrefix = $strPrefix . '__';
			} else {
				$strTableName = 'table_transaction';
				$strAliasPrefix = '';
			}

			$objBuilder->AddSelectItem($strTableName, 'id', $strAliasPrefix . 'id');
			$objBuilder->AddSelectItem($strTableName, 'user_id', $strAliasPrefix . 'user_id');
			$objBuilder->AddSelectItem($strTableName, 'project_id', $strAliasPrefix . 'project_id');
			$objBuilder->AddSelectItem($strTableName, 'item_get_id', $strAliasPrefix . 'item_get_id');
			$objBuilder->AddSelectItem($strTableName, 'point_in_id', $strAliasPrefix . 'point_in_id');
			$objBuilder->AddSelectItem($strTableName, 'point_out_id', $strAliasPrefix . 'point_out_id');
			$objBuilder->AddSelectItem($strTableName, 'escrow_id', $strAliasPrefix . 'escrow_id');
			$objBuilder->AddSelectItem($strTableName, 'currency', $strAliasPrefix . 'currency');
			$objBuilder->AddSelectItem($strTableName, 'balance_before', $strAliasPrefix . 'balance_before');
			$objBuilder->AddSelectItem($strTableName, 'balance_after', $strAliasPrefix . 'balance_after');
			$objBuilder->AddSelectItem($strTableName, 'amount', $strAliasPrefix . 'amount');
			$objBuilder->AddSelectItem($strTableName, 'transaction_date', $strAliasPrefix . 'transaction_date');
			$objBuilder->AddSelectItem($strTableName, 'type', $strAliasPrefix . 'type');
			$objBuilder->AddSelectItem($strTableName, 'description', $strAliasPrefix . 'description');
			$objBuilder->AddSelectItem($strTableName, 'active', $strAliasPrefix . 'active');
			$objBuilder->AddSelectItem($strTableName, 'ip', $strAliasPrefix . 'ip');
			$objBuilder->AddSelectItem($strTableName, 'point_charged_id', $strAliasPrefix . 'point_charged_id');
		}



		///////////////////////////////
		// INSTANTIATION-RELATED METHODS
		///////////////////////////////

		/**
		 * Instantiate a TableTransaction from a Database Row.
		 * Takes in an optional strAliasPrefix, used in case another Object::InstantiateDbRow
		 * is calling this TableTransaction::InstantiateDbRow in order to perform
		 * early binding on referenced objects.
		 * @param DatabaseRowBase $objDbRow
		 * @param string $strAliasPrefix
		 * @param string $strExpandAsArrayNodes
		 * @param QBaseClass $arrPreviousItem
		 * @param string[] $strColumnAliasArray
		 * @return TableTransaction
		*/
		public static function InstantiateDbRow($objDbRow, $strAliasPrefix = null, $strExpandAsArrayNodes = null, $arrPreviousItems = null, $strColumnAliasArray = array()) {
			// If blank row, return null
			if (!$objDbRow) {
				return null;
			}
			// See if we're doing an array expansion on the previous item
			$strAlias = $strAliasPrefix . 'id';
			$strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
			if (($strExpandAsArrayNodes) && is_array($arrPreviousItems) && count($arrPreviousItems)) {
				foreach ($arrPreviousItems as $objPreviousItem) {            
					if ($objPreviousItem->intId == $objDbRow->GetColumn($strAliasName, 'Integer')) {        
						// We are.  Now, prepare to check for ExpandAsArray clauses
						$blnExpandedViaArray = false;
						if (!$strAliasPrefix)
							$strAliasPrefix = 'table_transaction__';


						// Expanding reverse references: TableBankRequestInAsTransaction
						$strAlias = $strAliasPrefix . 'tablebankrequestinastransaction__id';
						$strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
						if ((array_key_exists($strAlias, $strExpandAsArrayNodes)) &&
							(!is_null($objDbRow->GetColumn($strAliasName)))) {
							if ($intPreviousChildItemCount = count($objPreviousItem->_objTableBankRequestInAsTransactionArray)) {
								$objPreviousChildItems = $objPreviousItem->_objTableBankRequestInAsTransactionArray;
								$objChildItem = TableBankRequestIn::InstantiateDbRow($objDbRow, $strAliasPrefix . 'tablebankrequestinastransaction__', $strExpandAsArrayNodes, $objPreviousChildItems, $strColumnAliasArray);
								if ($objChildItem) {
									$objPreviousItem->_objTableBankRequestInAsTransactionArray[] = $objChildItem;
								}
							} else {
								$objPreviousItem->_objTableBankRequestInAsTransactionArray[] = TableBankRequestIn::InstantiateDbRow($objDbRow, $strAliasPrefix . 'tablebankrequestinastransaction__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
							}
							$blnExpandedViaArray = true;
						}

						// Expanding reverse references: TableBankRequestInAsProcessTransaction
						$strAlias = $strAliasPrefix . 'tablebankrequestinasprocesstransaction__id';
						$strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
						if ((array_key_exists($strAlias, $strExpandAsArrayNodes)) &&
							(!is_null($objDbRow->GetColumn($strAliasName)))) {
							if ($intPreviousChildItemCount = count($objPreviousItem->_objTableBankRequestInAsProcessTransactionArray)) {
								$objPreviousChildItems = $objPreviousItem->_objTableBankRequestInAsProcessTransactionArray;
								$objChildItem = TableBankRequestIn::InstantiateDbRow($objDbRow, $strAliasPrefix . 'tablebankrequestinasprocesstransaction__', $strExpandAsArrayNodes, $objPreviousChildItems, $strColumnAliasArray);
								if ($objChildItem) {
									$objPreviousItem->_objTableBankRequestInAsProcessTransactionArray[] = $objChildItem;
								}
							} else {
								$objPreviousItem->_objTableBankRequestInAsProcessTransactionArray[] = TableBankRequestIn::InstantiateDbRow($objDbRow, $strAliasPrefix . 'tablebankrequestinasprocesstransaction__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
							}
							$blnExpandedViaArray = true;
						}

						// Expanding reverse references: TableBankRequestOutAsTransaction
						$strAlias = $strAliasPrefix . 'tablebankrequestoutastransaction__id';
						$strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
						if ((array_key_exists($strAlias, $strExpandAsArrayNodes)) &&
							(!is_null($objDbRow->GetColumn($strAliasName)))) {
							if ($intPreviousChildItemCount = count($objPreviousItem->_objTableBankRequestOutAsTransactionArray)) {
								$objPreviousChildItems = $objPreviousItem->_objTableBankRequestOutAsTransactionArray;
								$objChildItem = TableBankRequestOut::InstantiateDbRow($objDbRow, $strAliasPrefix . 'tablebankrequestoutastransaction__', $strExpandAsArrayNodes, $objPreviousChildItems, $strColumnAliasArray);
								if ($objChildItem) {
									$objPreviousItem->_objTableBankRequestOutAsTransactionArray[] = $objChildItem;
								}
							} else {
								$objPreviousItem->_objTableBankRequestOutAsTransactionArray[] = TableBankRequestOut::InstantiateDbRow($objDbRow, $strAliasPrefix . 'tablebankrequestoutastransaction__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
							}
							$blnExpandedViaArray = true;
						}

						// Expanding reverse references: TableBankRequestOutAsProcessTransaction
						$strAlias = $strAliasPrefix . 'tablebankrequestoutasprocesstransaction__id';
						$strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
						if ((array_key_exists($strAlias, $strExpandAsArrayNodes)) &&
							(!is_null($objDbRow->GetColumn($strAliasName)))) {
							if ($intPreviousChildItemCount = count($objPreviousItem->_objTableBankRequestOutAsProcessTransactionArray)) {
								$objPreviousChildItems = $objPreviousItem->_objTableBankRequestOutAsProcessTransactionArray;
								$objChildItem = TableBankRequestOut::InstantiateDbRow($objDbRow, $strAliasPrefix . 'tablebankrequestoutasprocesstransaction__', $strExpandAsArrayNodes, $objPreviousChildItems, $strColumnAliasArray);
								if ($objChildItem) {
									$objPreviousItem->_objTableBankRequestOutAsProcessTransactionArray[] = $objChildItem;
								}
							} else {
								$objPreviousItem->_objTableBankRequestOutAsProcessTransactionArray[] = TableBankRequestOut::InstantiateDbRow($objDbRow, $strAliasPrefix . 'tablebankrequestoutasprocesstransaction__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
							}
							$blnExpandedViaArray = true;
						}

						// Either return false to signal array expansion, or check-to-reset the Alias prefix and move on
						if ($blnExpandedViaArray) {
							return false;
						} else if ($strAliasPrefix == 'table_transaction__') {
							$strAliasPrefix = null;
						}
					}
				}
			}

			// Create a new instance of the TableTransaction object
			$objToReturn = new TableTransaction();
			$objToReturn->__blnRestored = true;

			$strAliasName = array_key_exists($strAliasPrefix . 'id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'id'] : $strAliasPrefix . 'id';
			$objToReturn->intId = $objDbRow->GetColumn($strAliasName, 'Integer');
			$strAliasName = array_key_exists($strAliasPrefix . 'user_id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'user_id'] : $strAliasPrefix . 'user_id';
			$objToReturn->intUserId = $objDbRow->GetColumn($strAliasName, 'Integer');
			$strAliasName = array_key_exists($strAliasPrefix . 'project_id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'project_id'] : $strAliasPrefix . 'project_id';
			$objToReturn->intProjectId = $objDbRow->GetColumn($strAliasName, 'Integer');
			$strAliasName = array_key_exists($strAliasPrefix . 'item_get_id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'item_get_id'] : $strAliasPrefix . 'item_get_id';
			$objToReturn->intItemGetId = $objDbRow->GetColumn($strAliasName, 'Integer');
			$strAliasName = array_key_exists($strAliasPrefix . 'point_in_id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'point_in_id'] : $strAliasPrefix . 'point_in_id';
			$objToReturn->intPointInId = $objDbRow->GetColumn($strAliasName, 'Integer');
			$strAliasName = array_key_exists($strAliasPrefix . 'point_out_id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'point_out_id'] : $strAliasPrefix . 'point_out_id';
			$objToReturn->intPointOutId = $objDbRow->GetColumn($strAliasName, 'Integer');
			$strAliasName = array_key_exists($strAliasPrefix . 'escrow_id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'escrow_id'] : $strAliasPrefix . 'escrow_id';
			$objToReturn->intEscrowId = $objDbRow->GetColumn($strAliasName, 'Integer');
			$strAliasName = array_key_exists($strAliasPrefix . 'currency', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'currency'] : $strAliasPrefix . 'currency';
			$objToReturn->intCurrency = $objDbRow->GetColumn($strAliasName, 'Integer');
			$strAliasName = array_key_exists($strAliasPrefix . 'balance_before', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'balance_before'] : $strAliasPrefix . 'balance_before';
			$objToReturn->intBalanceBefore = $objDbRow->GetColumn($strAliasName, 'Integer');
			$strAliasName = array_key_exists($strAliasPrefix . 'balance_after', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'balance_after'] : $strAliasPrefix . 'balance_after';
			$objToReturn->intBalanceAfter = $objDbRow->GetColumn($strAliasName, 'Integer');
			$strAliasName = array_key_exists($strAliasPrefix . 'amount', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'amount'] : $strAliasPrefix . 'amount';
			$objToReturn->intAmount = $objDbRow->GetColumn($strAliasName, 'Integer');
			$strAliasName = array_key_exists($strAliasPrefix . 'transaction_date', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'transaction_date'] : $strAliasPrefix . 'transaction_date';
			$objToReturn->dttTransactionDate = $objDbRow->GetColumn($strAliasName, 'DateTime');
			$strAliasName = array_key_exists($strAliasPrefix . 'type', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'type'] : $strAliasPrefix . 'type';
			$objToReturn->intType = $objDbRow->GetColumn($strAliasName, 'Integer');
			$strAliasName = array_key_exists($strAliasPrefix . 'description', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'description'] : $strAliasPrefix . 'description';
			$objToReturn->strDescription = $objDbRow->GetColumn($strAliasName, 'VarChar');
			$strAliasName = array_key_exists($strAliasPrefix . 'active', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'active'] : $strAliasPrefix . 'active';
			$objToReturn->strActive = $objDbRow->GetColumn($strAliasName, 'VarChar');
			$strAliasName = array_key_exists($strAliasPrefix . 'ip', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'ip'] : $strAliasPrefix . 'ip';
			$objToReturn->strIp = $objDbRow->GetColumn($strAliasName, 'VarChar');
			$strAliasName = array_key_exists($strAliasPrefix . 'point_charged_id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'point_charged_id'] : $strAliasPrefix . 'point_charged_id';
			$objToReturn->strPointChargedId = $objDbRow->GetColumn($strAliasName, 'VarChar');

			if (isset($arrPreviousItems) && is_array($arrPreviousItems)) {
				foreach ($arrPreviousItems as $objPreviousItem) {
					if ($objToReturn->Id != $objPreviousItem->Id) {
						continue;
					}
					if (array_diff($objPreviousItem->_objTableBankRequestInAsTransactionArray, $objToReturn->_objTableBankRequestInAsTransactionArray) != null) {
						continue;
					}
					if (array_diff($objPreviousItem->_objTableBankRequestInAsProcessTransactionArray, $objToReturn->_objTableBankRequestInAsProcessTransactionArray) != null) {
						continue;
					}
					if (array_diff($objPreviousItem->_objTableBankRequestOutAsTransactionArray, $objToReturn->_objTableBankRequestOutAsTransactionArray) != null) {
						continue;
					}
					if (array_diff($objPreviousItem->_objTableBankRequestOutAsProcessTransactionArray, $objToReturn->_objTableBankRequestOutAsProcessTransactionArray) != null) {
						continue;
					}

					// complete match - all primary key columns are the same
					return null;
				}
			}

			// Instantiate Virtual Attributes
			foreach ($objDbRow->GetColumnNameArray() as $strColumnName => $mixValue) {
				$strVirtualPrefix = $strAliasPrefix . '__';
				$strVirtualPrefixLength = strlen($strVirtualPrefix);
				if (substr($strColumnName, 0, $strVirtualPrefixLength) == $strVirtualPrefix)
					$objToReturn->__strVirtualAttributeArray[substr($strColumnName, $strVirtualPrefixLength)] = $mixValue;
			}

			// Prepare to Check for Early/Virtual Binding
			if (!$strAliasPrefix)
				$strAliasPrefix = 'table_transaction__';

			// Check for User Early Binding
			$strAlias = $strAliasPrefix . 'user_id__id';
			$strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
			if (!is_null($objDbRow->GetColumn($strAliasName)))
				$objToReturn->objUser = TableUserProject::InstantiateDbRow($objDbRow, $strAliasPrefix . 'user_id__', $strExpandAsArrayNodes, null, $strColumnAliasArray);

			// Check for Project Early Binding
			$strAlias = $strAliasPrefix . 'project_id__id';
			$strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
			if (!is_null($objDbRow->GetColumn($strAliasName)))
				$objToReturn->objProject = TableProject::InstantiateDbRow($objDbRow, $strAliasPrefix . 'project_id__', $strExpandAsArrayNodes, null, $strColumnAliasArray);

			// Check for ItemGet Early Binding
			$strAlias = $strAliasPrefix . 'item_get_id__id';
			$strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
			if (!is_null($objDbRow->GetColumn($strAliasName)))
				$objToReturn->objItemGet = TableItemGet::InstantiateDbRow($objDbRow, $strAliasPrefix . 'item_get_id__', $strExpandAsArrayNodes, null, $strColumnAliasArray);

			// Check for PointIn Early Binding
			$strAlias = $strAliasPrefix . 'point_in_id__id';
			$strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
			if (!is_null($objDbRow->GetColumn($strAliasName)))
				$objToReturn->objPointIn = TablePointIn::InstantiateDbRow($objDbRow, $strAliasPrefix . 'point_in_id__', $strExpandAsArrayNodes, null, $strColumnAliasArray);

			// Check for PointOut Early Binding
			$strAlias = $strAliasPrefix . 'point_out_id__id';
			$strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
			if (!is_null($objDbRow->GetColumn($strAliasName)))
				$objToReturn->objPointOut = TablePointOut::InstantiateDbRow($objDbRow, $strAliasPrefix . 'point_out_id__', $strExpandAsArrayNodes, null, $strColumnAliasArray);

			// Check for Escrow Early Binding
			$strAlias = $strAliasPrefix . 'escrow_id__id';
			$strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
			if (!is_null($objDbRow->GetColumn($strAliasName)))
				$objToReturn->objEscrow = TableEscrow::InstantiateDbRow($objDbRow, $strAliasPrefix . 'escrow_id__', $strExpandAsArrayNodes, null, $strColumnAliasArray);




			// Check for TableBankRequestInAsTransaction Virtual Binding
			$strAlias = $strAliasPrefix . 'tablebankrequestinastransaction__id';
			$strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
			if (!is_null($objDbRow->GetColumn($strAliasName))) {
				if (($strExpandAsArrayNodes) && (array_key_exists($strAlias, $strExpandAsArrayNodes)))
					$objToReturn->_objTableBankRequestInAsTransactionArray[] = TableBankRequestIn::InstantiateDbRow($objDbRow, $strAliasPrefix . 'tablebankrequestinastransaction__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
				else
					$objToReturn->_objTableBankRequestInAsTransaction = TableBankRequestIn::InstantiateDbRow($objDbRow, $strAliasPrefix . 'tablebankrequestinastransaction__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
			}

			// Check for TableBankRequestInAsProcessTransaction Virtual Binding
			$strAlias = $strAliasPrefix . 'tablebankrequestinasprocesstransaction__id';
			$strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
			if (!is_null($objDbRow->GetColumn($strAliasName))) {
				if (($strExpandAsArrayNodes) && (array_key_exists($strAlias, $strExpandAsArrayNodes)))
					$objToReturn->_objTableBankRequestInAsProcessTransactionArray[] = TableBankRequestIn::InstantiateDbRow($objDbRow, $strAliasPrefix . 'tablebankrequestinasprocesstransaction__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
				else
					$objToReturn->_objTableBankRequestInAsProcessTransaction = TableBankRequestIn::InstantiateDbRow($objDbRow, $strAliasPrefix . 'tablebankrequestinasprocesstransaction__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
			}

			// Check for TableBankRequestOutAsTransaction Virtual Binding
			$strAlias = $strAliasPrefix . 'tablebankrequestoutastransaction__id';
			$strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
			if (!is_null($objDbRow->GetColumn($strAliasName))) {
				if (($strExpandAsArrayNodes) && (array_key_exists($strAlias, $strExpandAsArrayNodes)))
					$objToReturn->_objTableBankRequestOutAsTransactionArray[] = TableBankRequestOut::InstantiateDbRow($objDbRow, $strAliasPrefix . 'tablebankrequestoutastransaction__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
				else
					$objToReturn->_objTableBankRequestOutAsTransaction = TableBankRequestOut::InstantiateDbRow($objDbRow, $strAliasPrefix . 'tablebankrequestoutastransaction__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
			}

			// Check for TableBankRequestOutAsProcessTransaction Virtual Binding
			$strAlias = $strAliasPrefix . 'tablebankrequestoutasprocesstransaction__id';
			$strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
			if (!is_null($objDbRow->GetColumn($strAliasName))) {
				if (($strExpandAsArrayNodes) && (array_key_exists($strAlias, $strExpandAsArrayNodes)))
					$objToReturn->_objTableBankRequestOutAsProcessTransactionArray[] = TableBankRequestOut::InstantiateDbRow($objDbRow, $strAliasPrefix . 'tablebankrequestoutasprocesstransaction__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
				else
					$objToReturn->_objTableBankRequestOutAsProcessTransaction = TableBankRequestOut::InstantiateDbRow($objDbRow, $strAliasPrefix . 'tablebankrequestoutasprocesstransaction__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
			}

			return $objToReturn;
		}

		/**
		 * Instantiate an array of TableTransactions from a Database Result
		 * @param DatabaseResultBase $objDbResult
		 * @param string $strExpandAsArrayNodes
		 * @param string[] $strColumnAliasArray
		 * @return TableTransaction[]
		 */
		public static function InstantiateDbResult(QDatabaseResultBase $objDbResult, $strExpandAsArrayNodes = null, $strColumnAliasArray = null) {
			$objToReturn = array();
			
			if (!$strColumnAliasArray)
				$strColumnAliasArray = array();

			// If blank resultset, then return empty array
			if (!$objDbResult)
				return $objToReturn;

			// Load up the return array with each row
			if ($strExpandAsArrayNodes) {
				$objToReturn = array();
				while ($objDbRow = $objDbResult->GetNextRow()) {
					$objItem = TableTransaction::InstantiateDbRow($objDbRow, null, $strExpandAsArrayNodes, $objToReturn, $strColumnAliasArray);
					if ($objItem) {
						$objToReturn[] = $objItem;
					}
				}
			} else {
				while ($objDbRow = $objDbResult->GetNextRow())
					$objToReturn[] = TableTransaction::InstantiateDbRow($objDbRow, null, null, null, $strColumnAliasArray);
			}

			return $objToReturn;
		}



		///////////////////////////////////////////////////
		// INDEX-BASED LOAD METHODS (Single Load and Array)
		///////////////////////////////////////////////////
			
		/**
		 * Load a single TableTransaction object,
		 * by Id Index(es)
		 * @param integer $intId
		 * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
		 * @return TableTransaction
		*/
		public static function LoadById($intId, $objOptionalClauses = null) {
			return TableTransaction::QuerySingle(
				QQ::AndCondition(
					QQ::Equal(QQN::TableTransaction()->Id, $intId)
				),
				$objOptionalClauses
			);
		}
			
		/**
		 * Load an array of TableTransaction objects,
		 * by UserId Index(es)
		 * @param integer $intUserId
		 * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
		 * @return TableTransaction[]
		*/
		public static function LoadArrayByUserId($intUserId, $objOptionalClauses = null) {
			// Call TableTransaction::QueryArray to perform the LoadArrayByUserId query
			try {
				return TableTransaction::QueryArray(
					QQ::Equal(QQN::TableTransaction()->UserId, $intUserId),
					$objOptionalClauses);
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * Count TableTransactions
		 * by UserId Index(es)
		 * @param integer $intUserId
		 * @return int
		*/
		public static function CountByUserId($intUserId) {
			// Call TableTransaction::QueryCount to perform the CountByUserId query
			return TableTransaction::QueryCount(
				QQ::Equal(QQN::TableTransaction()->UserId, $intUserId)
			);
		}
			
		/**
		 * Load an array of TableTransaction objects,
		 * by ProjectId Index(es)
		 * @param integer $intProjectId
		 * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
		 * @return TableTransaction[]
		*/
		public static function LoadArrayByProjectId($intProjectId, $objOptionalClauses = null) {
			// Call TableTransaction::QueryArray to perform the LoadArrayByProjectId query
			try {
				return TableTransaction::QueryArray(
					QQ::Equal(QQN::TableTransaction()->ProjectId, $intProjectId),
					$objOptionalClauses);
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * Count TableTransactions
		 * by ProjectId Index(es)
		 * @param integer $intProjectId
		 * @return int
		*/
		public static function CountByProjectId($intProjectId) {
			// Call TableTransaction::QueryCount to perform the CountByProjectId query
			return TableTransaction::QueryCount(
				QQ::Equal(QQN::TableTransaction()->ProjectId, $intProjectId)
			);
		}
			
		/**
		 * Load an array of TableTransaction objects,
		 * by PointInId Index(es)
		 * @param integer $intPointInId
		 * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
		 * @return TableTransaction[]
		*/
		public static function LoadArrayByPointInId($intPointInId, $objOptionalClauses = null) {
			// Call TableTransaction::QueryArray to perform the LoadArrayByPointInId query
			try {
				return TableTransaction::QueryArray(
					QQ::Equal(QQN::TableTransaction()->PointInId, $intPointInId),
					$objOptionalClauses);
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * Count TableTransactions
		 * by PointInId Index(es)
		 * @param integer $intPointInId
		 * @return int
		*/
		public static function CountByPointInId($intPointInId) {
			// Call TableTransaction::QueryCount to perform the CountByPointInId query
			return TableTransaction::QueryCount(
				QQ::Equal(QQN::TableTransaction()->PointInId, $intPointInId)
			);
		}
			
		/**
		 * Load an array of TableTransaction objects,
		 * by PointOutId Index(es)
		 * @param integer $intPointOutId
		 * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
		 * @return TableTransaction[]
		*/
		public static function LoadArrayByPointOutId($intPointOutId, $objOptionalClauses = null) {
			// Call TableTransaction::QueryArray to perform the LoadArrayByPointOutId query
			try {
				return TableTransaction::QueryArray(
					QQ::Equal(QQN::TableTransaction()->PointOutId, $intPointOutId),
					$objOptionalClauses);
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * Count TableTransactions
		 * by PointOutId Index(es)
		 * @param integer $intPointOutId
		 * @return int
		*/
		public static function CountByPointOutId($intPointOutId) {
			// Call TableTransaction::QueryCount to perform the CountByPointOutId query
			return TableTransaction::QueryCount(
				QQ::Equal(QQN::TableTransaction()->PointOutId, $intPointOutId)
			);
		}
			
		/**
		 * Load an array of TableTransaction objects,
		 * by EscrowId Index(es)
		 * @param integer $intEscrowId
		 * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
		 * @return TableTransaction[]
		*/
		public static function LoadArrayByEscrowId($intEscrowId, $objOptionalClauses = null) {
			// Call TableTransaction::QueryArray to perform the LoadArrayByEscrowId query
			try {
				return TableTransaction::QueryArray(
					QQ::Equal(QQN::TableTransaction()->EscrowId, $intEscrowId),
					$objOptionalClauses);
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * Count TableTransactions
		 * by EscrowId Index(es)
		 * @param integer $intEscrowId
		 * @return int
		*/
		public static function CountByEscrowId($intEscrowId) {
			// Call TableTransaction::QueryCount to perform the CountByEscrowId query
			return TableTransaction::QueryCount(
				QQ::Equal(QQN::TableTransaction()->EscrowId, $intEscrowId)
			);
		}
			
		/**
		 * Load an array of TableTransaction objects,
		 * by Currency Index(es)
		 * @param integer $intCurrency
		 * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
		 * @return TableTransaction[]
		*/
		public static function LoadArrayByCurrency($intCurrency, $objOptionalClauses = null) {
			// Call TableTransaction::QueryArray to perform the LoadArrayByCurrency query
			try {
				return TableTransaction::QueryArray(
					QQ::Equal(QQN::TableTransaction()->Currency, $intCurrency),
					$objOptionalClauses);
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * Count TableTransactions
		 * by Currency Index(es)
		 * @param integer $intCurrency
		 * @return int
		*/
		public static function CountByCurrency($intCurrency) {
			// Call TableTransaction::QueryCount to perform the CountByCurrency query
			return TableTransaction::QueryCount(
				QQ::Equal(QQN::TableTransaction()->Currency, $intCurrency)
			);
		}
			
		/**
		 * Load an array of TableTransaction objects,
		 * by BalanceBefore Index(es)
		 * @param integer $intBalanceBefore
		 * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
		 * @return TableTransaction[]
		*/
		public static function LoadArrayByBalanceBefore($intBalanceBefore, $objOptionalClauses = null) {
			// Call TableTransaction::QueryArray to perform the LoadArrayByBalanceBefore query
			try {
				return TableTransaction::QueryArray(
					QQ::Equal(QQN::TableTransaction()->BalanceBefore, $intBalanceBefore),
					$objOptionalClauses);
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * Count TableTransactions
		 * by BalanceBefore Index(es)
		 * @param integer $intBalanceBefore
		 * @return int
		*/
		public static function CountByBalanceBefore($intBalanceBefore) {
			// Call TableTransaction::QueryCount to perform the CountByBalanceBefore query
			return TableTransaction::QueryCount(
				QQ::Equal(QQN::TableTransaction()->BalanceBefore, $intBalanceBefore)
			);
		}
			
		/**
		 * Load an array of TableTransaction objects,
		 * by BalanceAfter Index(es)
		 * @param integer $intBalanceAfter
		 * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
		 * @return TableTransaction[]
		*/
		public static function LoadArrayByBalanceAfter($intBalanceAfter, $objOptionalClauses = null) {
			// Call TableTransaction::QueryArray to perform the LoadArrayByBalanceAfter query
			try {
				return TableTransaction::QueryArray(
					QQ::Equal(QQN::TableTransaction()->BalanceAfter, $intBalanceAfter),
					$objOptionalClauses);
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * Count TableTransactions
		 * by BalanceAfter Index(es)
		 * @param integer $intBalanceAfter
		 * @return int
		*/
		public static function CountByBalanceAfter($intBalanceAfter) {
			// Call TableTransaction::QueryCount to perform the CountByBalanceAfter query
			return TableTransaction::QueryCount(
				QQ::Equal(QQN::TableTransaction()->BalanceAfter, $intBalanceAfter)
			);
		}
			
		/**
		 * Load an array of TableTransaction objects,
		 * by Amount Index(es)
		 * @param integer $intAmount
		 * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
		 * @return TableTransaction[]
		*/
		public static function LoadArrayByAmount($intAmount, $objOptionalClauses = null) {
			// Call TableTransaction::QueryArray to perform the LoadArrayByAmount query
			try {
				return TableTransaction::QueryArray(
					QQ::Equal(QQN::TableTransaction()->Amount, $intAmount),
					$objOptionalClauses);
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * Count TableTransactions
		 * by Amount Index(es)
		 * @param integer $intAmount
		 * @return int
		*/
		public static function CountByAmount($intAmount) {
			// Call TableTransaction::QueryCount to perform the CountByAmount query
			return TableTransaction::QueryCount(
				QQ::Equal(QQN::TableTransaction()->Amount, $intAmount)
			);
		}
			
		/**
		 * Load an array of TableTransaction objects,
		 * by TransactionDate Index(es)
		 * @param QDateTime $dttTransactionDate
		 * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
		 * @return TableTransaction[]
		*/
		public static function LoadArrayByTransactionDate($dttTransactionDate, $objOptionalClauses = null) {
			// Call TableTransaction::QueryArray to perform the LoadArrayByTransactionDate query
			try {
				return TableTransaction::QueryArray(
					QQ::Equal(QQN::TableTransaction()->TransactionDate, $dttTransactionDate),
					$objOptionalClauses);
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * Count TableTransactions
		 * by TransactionDate Index(es)
		 * @param QDateTime $dttTransactionDate
		 * @return int
		*/
		public static function CountByTransactionDate($dttTransactionDate) {
			// Call TableTransaction::QueryCount to perform the CountByTransactionDate query
			return TableTransaction::QueryCount(
				QQ::Equal(QQN::TableTransaction()->TransactionDate, $dttTransactionDate)
			);
		}
			
		/**
		 * Load an array of TableTransaction objects,
		 * by Type Index(es)
		 * @param integer $intType
		 * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
		 * @return TableTransaction[]
		*/
		public static function LoadArrayByType($intType, $objOptionalClauses = null) {
			// Call TableTransaction::QueryArray to perform the LoadArrayByType query
			try {
				return TableTransaction::QueryArray(
					QQ::Equal(QQN::TableTransaction()->Type, $intType),
					$objOptionalClauses);
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * Count TableTransactions
		 * by Type Index(es)
		 * @param integer $intType
		 * @return int
		*/
		public static function CountByType($intType) {
			// Call TableTransaction::QueryCount to perform the CountByType query
			return TableTransaction::QueryCount(
				QQ::Equal(QQN::TableTransaction()->Type, $intType)
			);
		}
			
		/**
		 * Load an array of TableTransaction objects,
		 * by Active Index(es)
		 * @param string $strActive
		 * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
		 * @return TableTransaction[]
		*/
		public static function LoadArrayByActive($strActive, $objOptionalClauses = null) {
			// Call TableTransaction::QueryArray to perform the LoadArrayByActive query
			try {
				return TableTransaction::QueryArray(
					QQ::Equal(QQN::TableTransaction()->Active, $strActive),
					$objOptionalClauses);
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * Count TableTransactions
		 * by Active Index(es)
		 * @param string $strActive
		 * @return int
		*/
		public static function CountByActive($strActive) {
			// Call TableTransaction::QueryCount to perform the CountByActive query
			return TableTransaction::QueryCount(
				QQ::Equal(QQN::TableTransaction()->Active, $strActive)
			);
		}
			
		/**
		 * Load an array of TableTransaction objects,
		 * by UserId, ProjectId, Type Index(es)
		 * @param integer $intUserId
		 * @param integer $intProjectId
		 * @param integer $intType
		 * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
		 * @return TableTransaction[]
		*/
		public static function LoadArrayByUserIdProjectIdType($intUserId, $intProjectId, $intType, $objOptionalClauses = null) {
			// Call TableTransaction::QueryArray to perform the LoadArrayByUserIdProjectIdType query
			try {
				return TableTransaction::QueryArray(
					QQ::AndCondition(
					QQ::Equal(QQN::TableTransaction()->UserId, $intUserId),
					QQ::Equal(QQN::TableTransaction()->ProjectId, $intProjectId),
					QQ::Equal(QQN::TableTransaction()->Type, $intType)
					),
					$objOptionalClauses);
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * Count TableTransactions
		 * by UserId, ProjectId, Type Index(es)
		 * @param integer $intUserId
		 * @param integer $intProjectId
		 * @param integer $intType
		 * @return int
		*/
		public static function CountByUserIdProjectIdType($intUserId, $intProjectId, $intType) {
			// Call TableTransaction::QueryCount to perform the CountByUserIdProjectIdType query
			return TableTransaction::QueryCount(
				QQ::AndCondition(
				QQ::Equal(QQN::TableTransaction()->UserId, $intUserId),
				QQ::Equal(QQN::TableTransaction()->ProjectId, $intProjectId),
				QQ::Equal(QQN::TableTransaction()->Type, $intType)
				)
			);
		}
			
		/**
		 * Load an array of TableTransaction objects,
		 * by PointChargedId Index(es)
		 * @param string $strPointChargedId
		 * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
		 * @return TableTransaction[]
		*/
		public static function LoadArrayByPointChargedId($strPointChargedId, $objOptionalClauses = null) {
			// Call TableTransaction::QueryArray to perform the LoadArrayByPointChargedId query
			try {
				return TableTransaction::QueryArray(
					QQ::Equal(QQN::TableTransaction()->PointChargedId, $strPointChargedId),
					$objOptionalClauses);
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * Count TableTransactions
		 * by PointChargedId Index(es)
		 * @param string $strPointChargedId
		 * @return int
		*/
		public static function CountByPointChargedId($strPointChargedId) {
			// Call TableTransaction::QueryCount to perform the CountByPointChargedId query
			return TableTransaction::QueryCount(
				QQ::Equal(QQN::TableTransaction()->PointChargedId, $strPointChargedId)
			);
		}
			
		/**
		 * Load an array of TableTransaction objects,
		 * by ItemGetId Index(es)
		 * @param integer $intItemGetId
		 * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
		 * @return TableTransaction[]
		*/
		public static function LoadArrayByItemGetId($intItemGetId, $objOptionalClauses = null) {
			// Call TableTransaction::QueryArray to perform the LoadArrayByItemGetId query
			try {
				return TableTransaction::QueryArray(
					QQ::Equal(QQN::TableTransaction()->ItemGetId, $intItemGetId),
					$objOptionalClauses);
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * Count TableTransactions
		 * by ItemGetId Index(es)
		 * @param integer $intItemGetId
		 * @return int
		*/
		public static function CountByItemGetId($intItemGetId) {
			// Call TableTransaction::QueryCount to perform the CountByItemGetId query
			return TableTransaction::QueryCount(
				QQ::Equal(QQN::TableTransaction()->ItemGetId, $intItemGetId)
			);
		}



		////////////////////////////////////////////////////
		// INDEX-BASED LOAD METHODS (Array via Many to Many)
		////////////////////////////////////////////////////




		//////////////////////////
		// SAVE, DELETE AND RELOAD
		//////////////////////////

		/**
		 * Save this TableTransaction
		 * @param bool $blnForceInsert
		 * @param bool $blnForceUpdate
		 * @return int
		 */
		public function Save($blnForceInsert = false, $blnForceUpdate = false) {
			// Get the Database Object for this Class
			$objDatabase = TableTransaction::GetDatabase();

			$mixToReturn = null;

			try {
				if ((!$this->__blnRestored) || ($blnForceInsert)) {
					// Perform an INSERT query
					$objDatabase->NonQuery('
						INSERT INTO `table_transaction` (
							`user_id`,
							`project_id`,
							`item_get_id`,
							`point_in_id`,
							`point_out_id`,
							`escrow_id`,
							`currency`,
							`balance_before`,
							`balance_after`,
							`amount`,
							`transaction_date`,
							`type`,
							`description`,
							`active`,
							`ip`,
							`point_charged_id`
						) VALUES (
							' . $objDatabase->SqlVariable($this->intUserId) . ',
							' . $objDatabase->SqlVariable($this->intProjectId) . ',
							' . $objDatabase->SqlVariable($this->intItemGetId) . ',
							' . $objDatabase->SqlVariable($this->intPointInId) . ',
							' . $objDatabase->SqlVariable($this->intPointOutId) . ',
							' . $objDatabase->SqlVariable($this->intEscrowId) . ',
							' . $objDatabase->SqlVariable($this->intCurrency) . ',
							' . $objDatabase->SqlVariable($this->intBalanceBefore) . ',
							' . $objDatabase->SqlVariable($this->intBalanceAfter) . ',
							' . $objDatabase->SqlVariable($this->intAmount) . ',
							' . $objDatabase->SqlVariable($this->dttTransactionDate) . ',
							' . $objDatabase->SqlVariable($this->intType) . ',
							' . $objDatabase->SqlVariable($this->strDescription) . ',
							' . $objDatabase->SqlVariable($this->strActive) . ',
							' . $objDatabase->SqlVariable($this->strIp) . ',
							' . $objDatabase->SqlVariable($this->strPointChargedId) . '
						)
					');

					// Update Identity column and return its value
					$mixToReturn = $this->intId = $objDatabase->InsertId('table_transaction', 'id');
				} else {
					// Perform an UPDATE query

					// First checking for Optimistic Locking constraints (if applicable)

					// Perform the UPDATE query
					$objDatabase->NonQuery('
						UPDATE
							`table_transaction`
						SET
							`user_id` = ' . $objDatabase->SqlVariable($this->intUserId) . ',
							`project_id` = ' . $objDatabase->SqlVariable($this->intProjectId) . ',
							`item_get_id` = ' . $objDatabase->SqlVariable($this->intItemGetId) . ',
							`point_in_id` = ' . $objDatabase->SqlVariable($this->intPointInId) . ',
							`point_out_id` = ' . $objDatabase->SqlVariable($this->intPointOutId) . ',
							`escrow_id` = ' . $objDatabase->SqlVariable($this->intEscrowId) . ',
							`currency` = ' . $objDatabase->SqlVariable($this->intCurrency) . ',
							`balance_before` = ' . $objDatabase->SqlVariable($this->intBalanceBefore) . ',
							`balance_after` = ' . $objDatabase->SqlVariable($this->intBalanceAfter) . ',
							`amount` = ' . $objDatabase->SqlVariable($this->intAmount) . ',
							`transaction_date` = ' . $objDatabase->SqlVariable($this->dttTransactionDate) . ',
							`type` = ' . $objDatabase->SqlVariable($this->intType) . ',
							`description` = ' . $objDatabase->SqlVariable($this->strDescription) . ',
							`active` = ' . $objDatabase->SqlVariable($this->strActive) . ',
							`ip` = ' . $objDatabase->SqlVariable($this->strIp) . ',
							`point_charged_id` = ' . $objDatabase->SqlVariable($this->strPointChargedId) . '
						WHERE
							`id` = ' . $objDatabase->SqlVariable($this->intId) . '
					');
				}

			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}

			// Update __blnRestored and any Non-Identity PK Columns (if applicable)
			$this->__blnRestored = true;


			// Return 
			return $mixToReturn;
		}

		/**
		 * Delete this TableTransaction
		 * @return void
		 */
		public function Delete() {
			if ((is_null($this->intId)))
				throw new QUndefinedPrimaryKeyException('Cannot delete this TableTransaction with an unset primary key.');

			// Get the Database Object for this Class
			$objDatabase = TableTransaction::GetDatabase();


			// Perform the SQL Query
			$objDatabase->NonQuery('
				DELETE FROM
					`table_transaction`
				WHERE
					`id` = ' . $objDatabase->SqlVariable($this->intId) . '');
		}

		/**
		 * Delete all TableTransactions
		 * @return void
		 */
		public static function DeleteAll() {
			// Get the Database Object for this Class
			$objDatabase = TableTransaction::GetDatabase();

			// Perform the Query
			$objDatabase->NonQuery('
				DELETE FROM
					`table_transaction`');
		}

		/**
		 * Truncate table_transaction table
		 * @return void
		 */
		public static function Truncate() {
			// Get the Database Object for this Class
			$objDatabase = TableTransaction::GetDatabase();

			// Perform the Query
			$objDatabase->NonQuery('
				TRUNCATE `table_transaction`');
		}

		/**
		 * Reload this TableTransaction from the database.
		 * @return void
		 */
		public function Reload() {
			// Make sure we are actually Restored from the database
			if (!$this->__blnRestored)
				throw new QCallerException('Cannot call Reload() on a new, unsaved TableTransaction object.');

			// Reload the Object
			$objReloaded = TableTransaction::Load($this->intId);

			// Update $this's local variables to match
			$this->UserId = $objReloaded->UserId;
			$this->ProjectId = $objReloaded->ProjectId;
			$this->ItemGetId = $objReloaded->ItemGetId;
			$this->PointInId = $objReloaded->PointInId;
			$this->PointOutId = $objReloaded->PointOutId;
			$this->EscrowId = $objReloaded->EscrowId;
			$this->intCurrency = $objReloaded->intCurrency;
			$this->intBalanceBefore = $objReloaded->intBalanceBefore;
			$this->intBalanceAfter = $objReloaded->intBalanceAfter;
			$this->intAmount = $objReloaded->intAmount;
			$this->dttTransactionDate = $objReloaded->dttTransactionDate;
			$this->intType = $objReloaded->intType;
			$this->strDescription = $objReloaded->strDescription;
			$this->strActive = $objReloaded->strActive;
			$this->strIp = $objReloaded->strIp;
			$this->strPointChargedId = $objReloaded->strPointChargedId;
		}



		////////////////////
		// PUBLIC OVERRIDERS
		////////////////////

				/**
		 * Override method to perform a property "Get"
		 * This will get the value of $strName
		 *
		 * @param string $strName Name of the property to get
		 * @return mixed
		 */
		public function __get($strName) {
			switch ($strName) {
				///////////////////
				// Member Variables
				///////////////////
				case 'Id':
					/**
					 * Gets the value for intId (Read-Only PK)
					 * @return integer
					 */
					return $this->intId;

				case 'UserId':
					/**
					 * Gets the value for intUserId (Not Null)
					 * @return integer
					 */
					return $this->intUserId;

				case 'ProjectId':
					/**
					 * Gets the value for intProjectId 
					 * @return integer
					 */
					return $this->intProjectId;

				case 'ItemGetId':
					/**
					 * Gets the value for intItemGetId 
					 * @return integer
					 */
					return $this->intItemGetId;

				case 'PointInId':
					/**
					 * Gets the value for intPointInId 
					 * @return integer
					 */
					return $this->intPointInId;

				case 'PointOutId':
					/**
					 * Gets the value for intPointOutId 
					 * @return integer
					 */
					return $this->intPointOutId;

				case 'EscrowId':
					/**
					 * Gets the value for intEscrowId 
					 * @return integer
					 */
					return $this->intEscrowId;

				case 'Currency':
					/**
					 * Gets the value for intCurrency 
					 * @return integer
					 */
					return $this->intCurrency;

				case 'BalanceBefore':
					/**
					 * Gets the value for intBalanceBefore 
					 * @return integer
					 */
					return $this->intBalanceBefore;

				case 'BalanceAfter':
					/**
					 * Gets the value for intBalanceAfter 
					 * @return integer
					 */
					return $this->intBalanceAfter;

				case 'Amount':
					/**
					 * Gets the value for intAmount 
					 * @return integer
					 */
					return $this->intAmount;

				case 'TransactionDate':
					/**
					 * Gets the value for dttTransactionDate 
					 * @return QDateTime
					 */
					return $this->dttTransactionDate;

				case 'Type':
					/**
					 * Gets the value for intType (Not Null)
					 * @return integer
					 */
					return $this->intType;

				case 'Description':
					/**
					 * Gets the value for strDescription (Not Null)
					 * @return string
					 */
					return $this->strDescription;

				case 'Active':
					/**
					 * Gets the value for strActive (Not Null)
					 * @return string
					 */
					return $this->strActive;

				case 'Ip':
					/**
					 * Gets the value for strIp 
					 * @return string
					 */
					return $this->strIp;

				case 'PointChargedId':
					/**
					 * Gets the value for strPointChargedId (Not Null)
					 * @return string
					 */
					return $this->strPointChargedId;


				///////////////////
				// Member Objects
				///////////////////
				case 'User':
					/**
					 * Gets the value for the TableUserProject object referenced by intUserId (Not Null)
					 * @return TableUserProject
					 */
					try {
						if ((!$this->objUser) && (!is_null($this->intUserId)))
							$this->objUser = TableUserProject::Load($this->intUserId);
						return $this->objUser;
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}

				case 'Project':
					/**
					 * Gets the value for the TableProject object referenced by intProjectId 
					 * @return TableProject
					 */
					try {
						if ((!$this->objProject) && (!is_null($this->intProjectId)))
							$this->objProject = TableProject::Load($this->intProjectId);
						return $this->objProject;
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}

				case 'ItemGet':
					/**
					 * Gets the value for the TableItemGet object referenced by intItemGetId 
					 * @return TableItemGet
					 */
					try {
						if ((!$this->objItemGet) && (!is_null($this->intItemGetId)))
							$this->objItemGet = TableItemGet::Load($this->intItemGetId);
						return $this->objItemGet;
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}

				case 'PointIn':
					/**
					 * Gets the value for the TablePointIn object referenced by intPointInId 
					 * @return TablePointIn
					 */
					try {
						if ((!$this->objPointIn) && (!is_null($this->intPointInId)))
							$this->objPointIn = TablePointIn::Load($this->intPointInId);
						return $this->objPointIn;
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}

				case 'PointOut':
					/**
					 * Gets the value for the TablePointOut object referenced by intPointOutId 
					 * @return TablePointOut
					 */
					try {
						if ((!$this->objPointOut) && (!is_null($this->intPointOutId)))
							$this->objPointOut = TablePointOut::Load($this->intPointOutId);
						return $this->objPointOut;
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}

				case 'Escrow':
					/**
					 * Gets the value for the TableEscrow object referenced by intEscrowId 
					 * @return TableEscrow
					 */
					try {
						if ((!$this->objEscrow) && (!is_null($this->intEscrowId)))
							$this->objEscrow = TableEscrow::Load($this->intEscrowId);
						return $this->objEscrow;
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}


				////////////////////////////
				// Virtual Object References (Many to Many and Reverse References)
				// (If restored via a "Many-to" expansion)
				////////////////////////////

				case '_TableBankRequestInAsTransaction':
					/**
					 * Gets the value for the private _objTableBankRequestInAsTransaction (Read-Only)
					 * if set due to an expansion on the table_bank_request_in.transaction_id reverse relationship
					 * @return TableBankRequestIn
					 */
					return $this->_objTableBankRequestInAsTransaction;

				case '_TableBankRequestInAsTransactionArray':
					/**
					 * Gets the value for the private _objTableBankRequestInAsTransactionArray (Read-Only)
					 * if set due to an ExpandAsArray on the table_bank_request_in.transaction_id reverse relationship
					 * @return TableBankRequestIn[]
					 */
					return (array) $this->_objTableBankRequestInAsTransactionArray;

				case '_TableBankRequestInAsProcessTransaction':
					/**
					 * Gets the value for the private _objTableBankRequestInAsProcessTransaction (Read-Only)
					 * if set due to an expansion on the table_bank_request_in.process_transaction_id reverse relationship
					 * @return TableBankRequestIn
					 */
					return $this->_objTableBankRequestInAsProcessTransaction;

				case '_TableBankRequestInAsProcessTransactionArray':
					/**
					 * Gets the value for the private _objTableBankRequestInAsProcessTransactionArray (Read-Only)
					 * if set due to an ExpandAsArray on the table_bank_request_in.process_transaction_id reverse relationship
					 * @return TableBankRequestIn[]
					 */
					return (array) $this->_objTableBankRequestInAsProcessTransactionArray;

				case '_TableBankRequestOutAsTransaction':
					/**
					 * Gets the value for the private _objTableBankRequestOutAsTransaction (Read-Only)
					 * if set due to an expansion on the table_bank_request_out.transaction_id reverse relationship
					 * @return TableBankRequestOut
					 */
					return $this->_objTableBankRequestOutAsTransaction;

				case '_TableBankRequestOutAsTransactionArray':
					/**
					 * Gets the value for the private _objTableBankRequestOutAsTransactionArray (Read-Only)
					 * if set due to an ExpandAsArray on the table_bank_request_out.transaction_id reverse relationship
					 * @return TableBankRequestOut[]
					 */
					return (array) $this->_objTableBankRequestOutAsTransactionArray;

				case '_TableBankRequestOutAsProcessTransaction':
					/**
					 * Gets the value for the private _objTableBankRequestOutAsProcessTransaction (Read-Only)
					 * if set due to an expansion on the table_bank_request_out.process_transaction_id reverse relationship
					 * @return TableBankRequestOut
					 */
					return $this->_objTableBankRequestOutAsProcessTransaction;

				case '_TableBankRequestOutAsProcessTransactionArray':
					/**
					 * Gets the value for the private _objTableBankRequestOutAsProcessTransactionArray (Read-Only)
					 * if set due to an ExpandAsArray on the table_bank_request_out.process_transaction_id reverse relationship
					 * @return TableBankRequestOut[]
					 */
					return (array) $this->_objTableBankRequestOutAsProcessTransactionArray;


				case '__Restored':
					return $this->__blnRestored;

				default:
					try {
						return parent::__get($strName);
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
			}
		}

				/**
		 * Override method to perform a property "Set"
		 * This will set the property $strName to be $mixValue
		 *
		 * @param string $strName Name of the property to set
		 * @param string $mixValue New value of the property
		 * @return mixed
		 */
		public function __set($strName, $mixValue) {
			switch ($strName) {
				///////////////////
				// Member Variables
				///////////////////
				case 'UserId':
					/**
					 * Sets the value for intUserId (Not Null)
					 * @param integer $mixValue
					 * @return integer
					 */
					try {
						$this->objUser = null;
						return ($this->intUserId = QType::Cast($mixValue, QType::Integer));
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}

				case 'ProjectId':
					/**
					 * Sets the value for intProjectId 
					 * @param integer $mixValue
					 * @return integer
					 */
					try {
						$this->objProject = null;
						return ($this->intProjectId = QType::Cast($mixValue, QType::Integer));
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}

				case 'ItemGetId':
					/**
					 * Sets the value for intItemGetId 
					 * @param integer $mixValue
					 * @return integer
					 */
					try {
						$this->objItemGet = null;
						return ($this->intItemGetId = QType::Cast($mixValue, QType::Integer));
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}

				case 'PointInId':
					/**
					 * Sets the value for intPointInId 
					 * @param integer $mixValue
					 * @return integer
					 */
					try {
						$this->objPointIn = null;
						return ($this->intPointInId = QType::Cast($mixValue, QType::Integer));
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}

				case 'PointOutId':
					/**
					 * Sets the value for intPointOutId 
					 * @param integer $mixValue
					 * @return integer
					 */
					try {
						$this->objPointOut = null;
						return ($this->intPointOutId = QType::Cast($mixValue, QType::Integer));
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}

				case 'EscrowId':
					/**
					 * Sets the value for intEscrowId 
					 * @param integer $mixValue
					 * @return integer
					 */
					try {
						$this->objEscrow = null;
						return ($this->intEscrowId = QType::Cast($mixValue, QType::Integer));
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}

				case 'Currency':
					/**
					 * Sets the value for intCurrency 
					 * @param integer $mixValue
					 * @return integer
					 */
					try {
						return ($this->intCurrency = QType::Cast($mixValue, QType::Integer));
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}

				case 'BalanceBefore':
					/**
					 * Sets the value for intBalanceBefore 
					 * @param integer $mixValue
					 * @return integer
					 */
					try {
						return ($this->intBalanceBefore = QType::Cast($mixValue, QType::Integer));
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}

				case 'BalanceAfter':
					/**
					 * Sets the value for intBalanceAfter 
					 * @param integer $mixValue
					 * @return integer
					 */
					try {
						return ($this->intBalanceAfter = QType::Cast($mixValue, QType::Integer));
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}

				case 'Amount':
					/**
					 * Sets the value for intAmount 
					 * @param integer $mixValue
					 * @return integer
					 */
					try {
						return ($this->intAmount = QType::Cast($mixValue, QType::Integer));
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}

				case 'TransactionDate':
					/**
					 * Sets the value for dttTransactionDate 
					 * @param QDateTime $mixValue
					 * @return QDateTime
					 */
					try {
						return ($this->dttTransactionDate = QType::Cast($mixValue, QType::DateTime));
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}

				case 'Type':
					/**
					 * Sets the value for intType (Not Null)
					 * @param integer $mixValue
					 * @return integer
					 */
					try {
						return ($this->intType = QType::Cast($mixValue, QType::Integer));
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}

				case 'Description':
					/**
					 * Sets the value for strDescription (Not Null)
					 * @param string $mixValue
					 * @return string
					 */
					try {
						return ($this->strDescription = QType::Cast($mixValue, QType::String));
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}

				case 'Active':
					/**
					 * Sets the value for strActive (Not Null)
					 * @param string $mixValue
					 * @return string
					 */
					try {
						return ($this->strActive = QType::Cast($mixValue, QType::String));
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}

				case 'Ip':
					/**
					 * Sets the value for strIp 
					 * @param string $mixValue
					 * @return string
					 */
					try {
						return ($this->strIp = QType::Cast($mixValue, QType::String));
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}

				case 'PointChargedId':
					/**
					 * Sets the value for strPointChargedId (Not Null)
					 * @param string $mixValue
					 * @return string
					 */
					try {
						return ($this->strPointChargedId = QType::Cast($mixValue, QType::String));
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}


				///////////////////
				// Member Objects
				///////////////////
				case 'User':
					/**
					 * Sets the value for the TableUserProject object referenced by intUserId (Not Null)
					 * @param TableUserProject $mixValue
					 * @return TableUserProject
					 */
					if (is_null($mixValue)) {
						$this->intUserId = null;
						$this->objUser = null;
						return null;
					} else {
						// Make sure $mixValue actually is a TableUserProject object
						try {
							$mixValue = QType::Cast($mixValue, 'TableUserProject');
						} catch (QInvalidCastException $objExc) {
							$objExc->IncrementOffset();
							throw $objExc;
						} 

						// Make sure $mixValue is a SAVED TableUserProject object
						if (is_null($mixValue->Id))
							throw new QCallerException('Unable to set an unsaved User for this TableTransaction');

						// Update Local Member Variables
						$this->objUser = $mixValue;
						$this->intUserId = $mixValue->Id;

						// Return $mixValue
						return $mixValue;
					}
					break;

				case 'Project':
					/**
					 * Sets the value for the TableProject object referenced by intProjectId 
					 * @param TableProject $mixValue
					 * @return TableProject
					 */
					if (is_null($mixValue)) {
						$this->intProjectId = null;
						$this->objProject = null;
						return null;
					} else {
						// Make sure $mixValue actually is a TableProject object
						try {
							$mixValue = QType::Cast($mixValue, 'TableProject');
						} catch (QInvalidCastException $objExc) {
							$objExc->IncrementOffset();
							throw $objExc;
						} 

						// Make sure $mixValue is a SAVED TableProject object
						if (is_null($mixValue->Id))
							throw new QCallerException('Unable to set an unsaved Project for this TableTransaction');

						// Update Local Member Variables
						$this->objProject = $mixValue;
						$this->intProjectId = $mixValue->Id;

						// Return $mixValue
						return $mixValue;
					}
					break;

				case 'ItemGet':
					/**
					 * Sets the value for the TableItemGet object referenced by intItemGetId 
					 * @param TableItemGet $mixValue
					 * @return TableItemGet
					 */
					if (is_null($mixValue)) {
						$this->intItemGetId = null;
						$this->objItemGet = null;
						return null;
					} else {
						// Make sure $mixValue actually is a TableItemGet object
						try {
							$mixValue = QType::Cast($mixValue, 'TableItemGet');
						} catch (QInvalidCastException $objExc) {
							$objExc->IncrementOffset();
							throw $objExc;
						} 

						// Make sure $mixValue is a SAVED TableItemGet object
						if (is_null($mixValue->Id))
							throw new QCallerException('Unable to set an unsaved ItemGet for this TableTransaction');

						// Update Local Member Variables
						$this->objItemGet = $mixValue;
						$this->intItemGetId = $mixValue->Id;

						// Return $mixValue
						return $mixValue;
					}
					break;

				case 'PointIn':
					/**
					 * Sets the value for the TablePointIn object referenced by intPointInId 
					 * @param TablePointIn $mixValue
					 * @return TablePointIn
					 */
					if (is_null($mixValue)) {
						$this->intPointInId = null;
						$this->objPointIn = null;
						return null;
					} else {
						// Make sure $mixValue actually is a TablePointIn object
						try {
							$mixValue = QType::Cast($mixValue, 'TablePointIn');
						} catch (QInvalidCastException $objExc) {
							$objExc->IncrementOffset();
							throw $objExc;
						} 

						// Make sure $mixValue is a SAVED TablePointIn object
						if (is_null($mixValue->Id))
							throw new QCallerException('Unable to set an unsaved PointIn for this TableTransaction');

						// Update Local Member Variables
						$this->objPointIn = $mixValue;
						$this->intPointInId = $mixValue->Id;

						// Return $mixValue
						return $mixValue;
					}
					break;

				case 'PointOut':
					/**
					 * Sets the value for the TablePointOut object referenced by intPointOutId 
					 * @param TablePointOut $mixValue
					 * @return TablePointOut
					 */
					if (is_null($mixValue)) {
						$this->intPointOutId = null;
						$this->objPointOut = null;
						return null;
					} else {
						// Make sure $mixValue actually is a TablePointOut object
						try {
							$mixValue = QType::Cast($mixValue, 'TablePointOut');
						} catch (QInvalidCastException $objExc) {
							$objExc->IncrementOffset();
							throw $objExc;
						} 

						// Make sure $mixValue is a SAVED TablePointOut object
						if (is_null($mixValue->Id))
							throw new QCallerException('Unable to set an unsaved PointOut for this TableTransaction');

						// Update Local Member Variables
						$this->objPointOut = $mixValue;
						$this->intPointOutId = $mixValue->Id;

						// Return $mixValue
						return $mixValue;
					}
					break;

				case 'Escrow':
					/**
					 * Sets the value for the TableEscrow object referenced by intEscrowId 
					 * @param TableEscrow $mixValue
					 * @return TableEscrow
					 */
					if (is_null($mixValue)) {
						$this->intEscrowId = null;
						$this->objEscrow = null;
						return null;
					} else {
						// Make sure $mixValue actually is a TableEscrow object
						try {
							$mixValue = QType::Cast($mixValue, 'TableEscrow');
						} catch (QInvalidCastException $objExc) {
							$objExc->IncrementOffset();
							throw $objExc;
						} 

						// Make sure $mixValue is a SAVED TableEscrow object
						if (is_null($mixValue->Id))
							throw new QCallerException('Unable to set an unsaved Escrow for this TableTransaction');

						// Update Local Member Variables
						$this->objEscrow = $mixValue;
						$this->intEscrowId = $mixValue->Id;

						// Return $mixValue
						return $mixValue;
					}
					break;

				default:
					try {
						return parent::__set($strName, $mixValue);
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
			}
		}

		/**
		 * Lookup a VirtualAttribute value (if applicable).  Returns NULL if none found.
		 * @param string $strName
		 * @return string
		 */
		public function GetVirtualAttribute($strName) {
			if (array_key_exists($strName, $this->__strVirtualAttributeArray))
				return $this->__strVirtualAttributeArray[$strName];
			return null;
		}



		///////////////////////////////
		// ASSOCIATED OBJECTS' METHODS
		///////////////////////////////

			
		
		// Related Objects' Methods for TableBankRequestInAsTransaction
		//-------------------------------------------------------------------

		/**
		 * Gets all associated TableBankRequestInsAsTransaction as an array of TableBankRequestIn objects
		 * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
		 * @return TableBankRequestIn[]
		*/ 
		public function GetTableBankRequestInAsTransactionArray($objOptionalClauses = null) {
			if ((is_null($this->intId)))
				return array();

			try {
				return TableBankRequestIn::LoadArrayByTransactionId($this->intId, $objOptionalClauses);
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * Counts all associated TableBankRequestInsAsTransaction
		 * @return int
		*/ 
		public function CountTableBankRequestInsAsTransaction() {
			if ((is_null($this->intId)))
				return 0;

			return TableBankRequestIn::CountByTransactionId($this->intId);
		}

		/**
		 * Associates a TableBankRequestInAsTransaction
		 * @param TableBankRequestIn $objTableBankRequestIn
		 * @return void
		*/ 
		public function AssociateTableBankRequestInAsTransaction(TableBankRequestIn $objTableBankRequestIn) {
			if ((is_null($this->intId)))
				throw new QUndefinedPrimaryKeyException('Unable to call AssociateTableBankRequestInAsTransaction on this unsaved TableTransaction.');
			if ((is_null($objTableBankRequestIn->Id)))
				throw new QUndefinedPrimaryKeyException('Unable to call AssociateTableBankRequestInAsTransaction on this TableTransaction with an unsaved TableBankRequestIn.');

			// Get the Database Object for this Class
			$objDatabase = TableTransaction::GetDatabase();

			// Perform the SQL Query
			$objDatabase->NonQuery('
				UPDATE
					`table_bank_request_in`
				SET
					`transaction_id` = ' . $objDatabase->SqlVariable($this->intId) . '
				WHERE
					`id` = ' . $objDatabase->SqlVariable($objTableBankRequestIn->Id) . '
			');
		}

		/**
		 * Unassociates a TableBankRequestInAsTransaction
		 * @param TableBankRequestIn $objTableBankRequestIn
		 * @return void
		*/ 
		public function UnassociateTableBankRequestInAsTransaction(TableBankRequestIn $objTableBankRequestIn) {
			if ((is_null($this->intId)))
				throw new QUndefinedPrimaryKeyException('Unable to call UnassociateTableBankRequestInAsTransaction on this unsaved TableTransaction.');
			if ((is_null($objTableBankRequestIn->Id)))
				throw new QUndefinedPrimaryKeyException('Unable to call UnassociateTableBankRequestInAsTransaction on this TableTransaction with an unsaved TableBankRequestIn.');

			// Get the Database Object for this Class
			$objDatabase = TableTransaction::GetDatabase();

			// Perform the SQL Query
			$objDatabase->NonQuery('
				UPDATE
					`table_bank_request_in`
				SET
					`transaction_id` = null
				WHERE
					`id` = ' . $objDatabase->SqlVariable($objTableBankRequestIn->Id) . ' AND
					`transaction_id` = ' . $objDatabase->SqlVariable($this->intId) . '
			');
		}

		/**
		 * Unassociates all TableBankRequestInsAsTransaction
		 * @return void
		*/ 
		public function UnassociateAllTableBankRequestInsAsTransaction() {
			if ((is_null($this->intId)))
				throw new QUndefinedPrimaryKeyException('Unable to call UnassociateTableBankRequestInAsTransaction on this unsaved TableTransaction.');

			// Get the Database Object for this Class
			$objDatabase = TableTransaction::GetDatabase();

			// Perform the SQL Query
			$objDatabase->NonQuery('
				UPDATE
					`table_bank_request_in`
				SET
					`transaction_id` = null
				WHERE
					`transaction_id` = ' . $objDatabase->SqlVariable($this->intId) . '
			');
		}

		/**
		 * Deletes an associated TableBankRequestInAsTransaction
		 * @param TableBankRequestIn $objTableBankRequestIn
		 * @return void
		*/ 
		public function DeleteAssociatedTableBankRequestInAsTransaction(TableBankRequestIn $objTableBankRequestIn) {
			if ((is_null($this->intId)))
				throw new QUndefinedPrimaryKeyException('Unable to call UnassociateTableBankRequestInAsTransaction on this unsaved TableTransaction.');
			if ((is_null($objTableBankRequestIn->Id)))
				throw new QUndefinedPrimaryKeyException('Unable to call UnassociateTableBankRequestInAsTransaction on this TableTransaction with an unsaved TableBankRequestIn.');

			// Get the Database Object for this Class
			$objDatabase = TableTransaction::GetDatabase();

			// Perform the SQL Query
			$objDatabase->NonQuery('
				DELETE FROM
					`table_bank_request_in`
				WHERE
					`id` = ' . $objDatabase->SqlVariable($objTableBankRequestIn->Id) . ' AND
					`transaction_id` = ' . $objDatabase->SqlVariable($this->intId) . '
			');
		}

		/**
		 * Deletes all associated TableBankRequestInsAsTransaction
		 * @return void
		*/ 
		public function DeleteAllTableBankRequestInsAsTransaction() {
			if ((is_null($this->intId)))
				throw new QUndefinedPrimaryKeyException('Unable to call UnassociateTableBankRequestInAsTransaction on this unsaved TableTransaction.');

			// Get the Database Object for this Class
			$objDatabase = TableTransaction::GetDatabase();

			// Perform the SQL Query
			$objDatabase->NonQuery('
				DELETE FROM
					`table_bank_request_in`
				WHERE
					`transaction_id` = ' . $objDatabase->SqlVariable($this->intId) . '
			');
		}

			
		
		// Related Objects' Methods for TableBankRequestInAsProcessTransaction
		//-------------------------------------------------------------------

		/**
		 * Gets all associated TableBankRequestInsAsProcessTransaction as an array of TableBankRequestIn objects
		 * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
		 * @return TableBankRequestIn[]
		*/ 
		public function GetTableBankRequestInAsProcessTransactionArray($objOptionalClauses = null) {
			if ((is_null($this->intId)))
				return array();

			try {
				return TableBankRequestIn::LoadArrayByProcessTransactionId($this->intId, $objOptionalClauses);
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * Counts all associated TableBankRequestInsAsProcessTransaction
		 * @return int
		*/ 
		public function CountTableBankRequestInsAsProcessTransaction() {
			if ((is_null($this->intId)))
				return 0;

			return TableBankRequestIn::CountByProcessTransactionId($this->intId);
		}

		/**
		 * Associates a TableBankRequestInAsProcessTransaction
		 * @param TableBankRequestIn $objTableBankRequestIn
		 * @return void
		*/ 
		public function AssociateTableBankRequestInAsProcessTransaction(TableBankRequestIn $objTableBankRequestIn) {
			if ((is_null($this->intId)))
				throw new QUndefinedPrimaryKeyException('Unable to call AssociateTableBankRequestInAsProcessTransaction on this unsaved TableTransaction.');
			if ((is_null($objTableBankRequestIn->Id)))
				throw new QUndefinedPrimaryKeyException('Unable to call AssociateTableBankRequestInAsProcessTransaction on this TableTransaction with an unsaved TableBankRequestIn.');

			// Get the Database Object for this Class
			$objDatabase = TableTransaction::GetDatabase();

			// Perform the SQL Query
			$objDatabase->NonQuery('
				UPDATE
					`table_bank_request_in`
				SET
					`process_transaction_id` = ' . $objDatabase->SqlVariable($this->intId) . '
				WHERE
					`id` = ' . $objDatabase->SqlVariable($objTableBankRequestIn->Id) . '
			');
		}

		/**
		 * Unassociates a TableBankRequestInAsProcessTransaction
		 * @param TableBankRequestIn $objTableBankRequestIn
		 * @return void
		*/ 
		public function UnassociateTableBankRequestInAsProcessTransaction(TableBankRequestIn $objTableBankRequestIn) {
			if ((is_null($this->intId)))
				throw new QUndefinedPrimaryKeyException('Unable to call UnassociateTableBankRequestInAsProcessTransaction on this unsaved TableTransaction.');
			if ((is_null($objTableBankRequestIn->Id)))
				throw new QUndefinedPrimaryKeyException('Unable to call UnassociateTableBankRequestInAsProcessTransaction on this TableTransaction with an unsaved TableBankRequestIn.');

			// Get the Database Object for this Class
			$objDatabase = TableTransaction::GetDatabase();

			// Perform the SQL Query
			$objDatabase->NonQuery('
				UPDATE
					`table_bank_request_in`
				SET
					`process_transaction_id` = null
				WHERE
					`id` = ' . $objDatabase->SqlVariable($objTableBankRequestIn->Id) . ' AND
					`process_transaction_id` = ' . $objDatabase->SqlVariable($this->intId) . '
			');
		}

		/**
		 * Unassociates all TableBankRequestInsAsProcessTransaction
		 * @return void
		*/ 
		public function UnassociateAllTableBankRequestInsAsProcessTransaction() {
			if ((is_null($this->intId)))
				throw new QUndefinedPrimaryKeyException('Unable to call UnassociateTableBankRequestInAsProcessTransaction on this unsaved TableTransaction.');

			// Get the Database Object for this Class
			$objDatabase = TableTransaction::GetDatabase();

			// Perform the SQL Query
			$objDatabase->NonQuery('
				UPDATE
					`table_bank_request_in`
				SET
					`process_transaction_id` = null
				WHERE
					`process_transaction_id` = ' . $objDatabase->SqlVariable($this->intId) . '
			');
		}

		/**
		 * Deletes an associated TableBankRequestInAsProcessTransaction
		 * @param TableBankRequestIn $objTableBankRequestIn
		 * @return void
		*/ 
		public function DeleteAssociatedTableBankRequestInAsProcessTransaction(TableBankRequestIn $objTableBankRequestIn) {
			if ((is_null($this->intId)))
				throw new QUndefinedPrimaryKeyException('Unable to call UnassociateTableBankRequestInAsProcessTransaction on this unsaved TableTransaction.');
			if ((is_null($objTableBankRequestIn->Id)))
				throw new QUndefinedPrimaryKeyException('Unable to call UnassociateTableBankRequestInAsProcessTransaction on this TableTransaction with an unsaved TableBankRequestIn.');

			// Get the Database Object for this Class
			$objDatabase = TableTransaction::GetDatabase();

			// Perform the SQL Query
			$objDatabase->NonQuery('
				DELETE FROM
					`table_bank_request_in`
				WHERE
					`id` = ' . $objDatabase->SqlVariable($objTableBankRequestIn->Id) . ' AND
					`process_transaction_id` = ' . $objDatabase->SqlVariable($this->intId) . '
			');
		}

		/**
		 * Deletes all associated TableBankRequestInsAsProcessTransaction
		 * @return void
		*/ 
		public function DeleteAllTableBankRequestInsAsProcessTransaction() {
			if ((is_null($this->intId)))
				throw new QUndefinedPrimaryKeyException('Unable to call UnassociateTableBankRequestInAsProcessTransaction on this unsaved TableTransaction.');

			// Get the Database Object for this Class
			$objDatabase = TableTransaction::GetDatabase();

			// Perform the SQL Query
			$objDatabase->NonQuery('
				DELETE FROM
					`table_bank_request_in`
				WHERE
					`process_transaction_id` = ' . $objDatabase->SqlVariable($this->intId) . '
			');
		}

			
		
		// Related Objects' Methods for TableBankRequestOutAsTransaction
		//-------------------------------------------------------------------

		/**
		 * Gets all associated TableBankRequestOutsAsTransaction as an array of TableBankRequestOut objects
		 * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
		 * @return TableBankRequestOut[]
		*/ 
		public function GetTableBankRequestOutAsTransactionArray($objOptionalClauses = null) {
			if ((is_null($this->intId)))
				return array();

			try {
				return TableBankRequestOut::LoadArrayByTransactionId($this->intId, $objOptionalClauses);
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * Counts all associated TableBankRequestOutsAsTransaction
		 * @return int
		*/ 
		public function CountTableBankRequestOutsAsTransaction() {
			if ((is_null($this->intId)))
				return 0;

			return TableBankRequestOut::CountByTransactionId($this->intId);
		}

		/**
		 * Associates a TableBankRequestOutAsTransaction
		 * @param TableBankRequestOut $objTableBankRequestOut
		 * @return void
		*/ 
		public function AssociateTableBankRequestOutAsTransaction(TableBankRequestOut $objTableBankRequestOut) {
			if ((is_null($this->intId)))
				throw new QUndefinedPrimaryKeyException('Unable to call AssociateTableBankRequestOutAsTransaction on this unsaved TableTransaction.');
			if ((is_null($objTableBankRequestOut->Id)))
				throw new QUndefinedPrimaryKeyException('Unable to call AssociateTableBankRequestOutAsTransaction on this TableTransaction with an unsaved TableBankRequestOut.');

			// Get the Database Object for this Class
			$objDatabase = TableTransaction::GetDatabase();

			// Perform the SQL Query
			$objDatabase->NonQuery('
				UPDATE
					`table_bank_request_out`
				SET
					`transaction_id` = ' . $objDatabase->SqlVariable($this->intId) . '
				WHERE
					`id` = ' . $objDatabase->SqlVariable($objTableBankRequestOut->Id) . '
			');
		}

		/**
		 * Unassociates a TableBankRequestOutAsTransaction
		 * @param TableBankRequestOut $objTableBankRequestOut
		 * @return void
		*/ 
		public function UnassociateTableBankRequestOutAsTransaction(TableBankRequestOut $objTableBankRequestOut) {
			if ((is_null($this->intId)))
				throw new QUndefinedPrimaryKeyException('Unable to call UnassociateTableBankRequestOutAsTransaction on this unsaved TableTransaction.');
			if ((is_null($objTableBankRequestOut->Id)))
				throw new QUndefinedPrimaryKeyException('Unable to call UnassociateTableBankRequestOutAsTransaction on this TableTransaction with an unsaved TableBankRequestOut.');

			// Get the Database Object for this Class
			$objDatabase = TableTransaction::GetDatabase();

			// Perform the SQL Query
			$objDatabase->NonQuery('
				UPDATE
					`table_bank_request_out`
				SET
					`transaction_id` = null
				WHERE
					`id` = ' . $objDatabase->SqlVariable($objTableBankRequestOut->Id) . ' AND
					`transaction_id` = ' . $objDatabase->SqlVariable($this->intId) . '
			');
		}

		/**
		 * Unassociates all TableBankRequestOutsAsTransaction
		 * @return void
		*/ 
		public function UnassociateAllTableBankRequestOutsAsTransaction() {
			if ((is_null($this->intId)))
				throw new QUndefinedPrimaryKeyException('Unable to call UnassociateTableBankRequestOutAsTransaction on this unsaved TableTransaction.');

			// Get the Database Object for this Class
			$objDatabase = TableTransaction::GetDatabase();

			// Perform the SQL Query
			$objDatabase->NonQuery('
				UPDATE
					`table_bank_request_out`
				SET
					`transaction_id` = null
				WHERE
					`transaction_id` = ' . $objDatabase->SqlVariable($this->intId) . '
			');
		}

		/**
		 * Deletes an associated TableBankRequestOutAsTransaction
		 * @param TableBankRequestOut $objTableBankRequestOut
		 * @return void
		*/ 
		public function DeleteAssociatedTableBankRequestOutAsTransaction(TableBankRequestOut $objTableBankRequestOut) {
			if ((is_null($this->intId)))
				throw new QUndefinedPrimaryKeyException('Unable to call UnassociateTableBankRequestOutAsTransaction on this unsaved TableTransaction.');
			if ((is_null($objTableBankRequestOut->Id)))
				throw new QUndefinedPrimaryKeyException('Unable to call UnassociateTableBankRequestOutAsTransaction on this TableTransaction with an unsaved TableBankRequestOut.');

			// Get the Database Object for this Class
			$objDatabase = TableTransaction::GetDatabase();

			// Perform the SQL Query
			$objDatabase->NonQuery('
				DELETE FROM
					`table_bank_request_out`
				WHERE
					`id` = ' . $objDatabase->SqlVariable($objTableBankRequestOut->Id) . ' AND
					`transaction_id` = ' . $objDatabase->SqlVariable($this->intId) . '
			');
		}

		/**
		 * Deletes all associated TableBankRequestOutsAsTransaction
		 * @return void
		*/ 
		public function DeleteAllTableBankRequestOutsAsTransaction() {
			if ((is_null($this->intId)))
				throw new QUndefinedPrimaryKeyException('Unable to call UnassociateTableBankRequestOutAsTransaction on this unsaved TableTransaction.');

			// Get the Database Object for this Class
			$objDatabase = TableTransaction::GetDatabase();

			// Perform the SQL Query
			$objDatabase->NonQuery('
				DELETE FROM
					`table_bank_request_out`
				WHERE
					`transaction_id` = ' . $objDatabase->SqlVariable($this->intId) . '
			');
		}

			
		
		// Related Objects' Methods for TableBankRequestOutAsProcessTransaction
		//-------------------------------------------------------------------

		/**
		 * Gets all associated TableBankRequestOutsAsProcessTransaction as an array of TableBankRequestOut objects
		 * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
		 * @return TableBankRequestOut[]
		*/ 
		public function GetTableBankRequestOutAsProcessTransactionArray($objOptionalClauses = null) {
			if ((is_null($this->intId)))
				return array();

			try {
				return TableBankRequestOut::LoadArrayByProcessTransactionId($this->intId, $objOptionalClauses);
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * Counts all associated TableBankRequestOutsAsProcessTransaction
		 * @return int
		*/ 
		public function CountTableBankRequestOutsAsProcessTransaction() {
			if ((is_null($this->intId)))
				return 0;

			return TableBankRequestOut::CountByProcessTransactionId($this->intId);
		}

		/**
		 * Associates a TableBankRequestOutAsProcessTransaction
		 * @param TableBankRequestOut $objTableBankRequestOut
		 * @return void
		*/ 
		public function AssociateTableBankRequestOutAsProcessTransaction(TableBankRequestOut $objTableBankRequestOut) {
			if ((is_null($this->intId)))
				throw new QUndefinedPrimaryKeyException('Unable to call AssociateTableBankRequestOutAsProcessTransaction on this unsaved TableTransaction.');
			if ((is_null($objTableBankRequestOut->Id)))
				throw new QUndefinedPrimaryKeyException('Unable to call AssociateTableBankRequestOutAsProcessTransaction on this TableTransaction with an unsaved TableBankRequestOut.');

			// Get the Database Object for this Class
			$objDatabase = TableTransaction::GetDatabase();

			// Perform the SQL Query
			$objDatabase->NonQuery('
				UPDATE
					`table_bank_request_out`
				SET
					`process_transaction_id` = ' . $objDatabase->SqlVariable($this->intId) . '
				WHERE
					`id` = ' . $objDatabase->SqlVariable($objTableBankRequestOut->Id) . '
			');
		}

		/**
		 * Unassociates a TableBankRequestOutAsProcessTransaction
		 * @param TableBankRequestOut $objTableBankRequestOut
		 * @return void
		*/ 
		public function UnassociateTableBankRequestOutAsProcessTransaction(TableBankRequestOut $objTableBankRequestOut) {
			if ((is_null($this->intId)))
				throw new QUndefinedPrimaryKeyException('Unable to call UnassociateTableBankRequestOutAsProcessTransaction on this unsaved TableTransaction.');
			if ((is_null($objTableBankRequestOut->Id)))
				throw new QUndefinedPrimaryKeyException('Unable to call UnassociateTableBankRequestOutAsProcessTransaction on this TableTransaction with an unsaved TableBankRequestOut.');

			// Get the Database Object for this Class
			$objDatabase = TableTransaction::GetDatabase();

			// Perform the SQL Query
			$objDatabase->NonQuery('
				UPDATE
					`table_bank_request_out`
				SET
					`process_transaction_id` = null
				WHERE
					`id` = ' . $objDatabase->SqlVariable($objTableBankRequestOut->Id) . ' AND
					`process_transaction_id` = ' . $objDatabase->SqlVariable($this->intId) . '
			');
		}

		/**
		 * Unassociates all TableBankRequestOutsAsProcessTransaction
		 * @return void
		*/ 
		public function UnassociateAllTableBankRequestOutsAsProcessTransaction() {
			if ((is_null($this->intId)))
				throw new QUndefinedPrimaryKeyException('Unable to call UnassociateTableBankRequestOutAsProcessTransaction on this unsaved TableTransaction.');

			// Get the Database Object for this Class
			$objDatabase = TableTransaction::GetDatabase();

			// Perform the SQL Query
			$objDatabase->NonQuery('
				UPDATE
					`table_bank_request_out`
				SET
					`process_transaction_id` = null
				WHERE
					`process_transaction_id` = ' . $objDatabase->SqlVariable($this->intId) . '
			');
		}

		/**
		 * Deletes an associated TableBankRequestOutAsProcessTransaction
		 * @param TableBankRequestOut $objTableBankRequestOut
		 * @return void
		*/ 
		public function DeleteAssociatedTableBankRequestOutAsProcessTransaction(TableBankRequestOut $objTableBankRequestOut) {
			if ((is_null($this->intId)))
				throw new QUndefinedPrimaryKeyException('Unable to call UnassociateTableBankRequestOutAsProcessTransaction on this unsaved TableTransaction.');
			if ((is_null($objTableBankRequestOut->Id)))
				throw new QUndefinedPrimaryKeyException('Unable to call UnassociateTableBankRequestOutAsProcessTransaction on this TableTransaction with an unsaved TableBankRequestOut.');

			// Get the Database Object for this Class
			$objDatabase = TableTransaction::GetDatabase();

			// Perform the SQL Query
			$objDatabase->NonQuery('
				DELETE FROM
					`table_bank_request_out`
				WHERE
					`id` = ' . $objDatabase->SqlVariable($objTableBankRequestOut->Id) . ' AND
					`process_transaction_id` = ' . $objDatabase->SqlVariable($this->intId) . '
			');
		}

		/**
		 * Deletes all associated TableBankRequestOutsAsProcessTransaction
		 * @return void
		*/ 
		public function DeleteAllTableBankRequestOutsAsProcessTransaction() {
			if ((is_null($this->intId)))
				throw new QUndefinedPrimaryKeyException('Unable to call UnassociateTableBankRequestOutAsProcessTransaction on this unsaved TableTransaction.');

			// Get the Database Object for this Class
			$objDatabase = TableTransaction::GetDatabase();

			// Perform the SQL Query
			$objDatabase->NonQuery('
				DELETE FROM
					`table_bank_request_out`
				WHERE
					`process_transaction_id` = ' . $objDatabase->SqlVariable($this->intId) . '
			');
		}





		////////////////////////////////////////
		// METHODS for SOAP-BASED WEB SERVICES
		////////////////////////////////////////

		public static function GetSoapComplexTypeXml() {
			$strToReturn = '<complexType name="TableTransaction"><sequence>';
			$strToReturn .= '<element name="Id" type="xsd:int"/>';
			$strToReturn .= '<element name="User" type="xsd1:TableUserProject"/>';
			$strToReturn .= '<element name="Project" type="xsd1:TableProject"/>';
			$strToReturn .= '<element name="ItemGet" type="xsd1:TableItemGet"/>';
			$strToReturn .= '<element name="PointIn" type="xsd1:TablePointIn"/>';
			$strToReturn .= '<element name="PointOut" type="xsd1:TablePointOut"/>';
			$strToReturn .= '<element name="Escrow" type="xsd1:TableEscrow"/>';
			$strToReturn .= '<element name="Currency" type="xsd:int"/>';
			$strToReturn .= '<element name="BalanceBefore" type="xsd:int"/>';
			$strToReturn .= '<element name="BalanceAfter" type="xsd:int"/>';
			$strToReturn .= '<element name="Amount" type="xsd:int"/>';
			$strToReturn .= '<element name="TransactionDate" type="xsd:dateTime"/>';
			$strToReturn .= '<element name="Type" type="xsd:int"/>';
			$strToReturn .= '<element name="Description" type="xsd:string"/>';
			$strToReturn .= '<element name="Active" type="xsd:string"/>';
			$strToReturn .= '<element name="Ip" type="xsd:string"/>';
			$strToReturn .= '<element name="PointChargedId" type="xsd:string"/>';
			$strToReturn .= '<element name="__blnRestored" type="xsd:boolean"/>';
			$strToReturn .= '</sequence></complexType>';
			return $strToReturn;
		}

		public static function AlterSoapComplexTypeArray(&$strComplexTypeArray) {
			if (!array_key_exists('TableTransaction', $strComplexTypeArray)) {
				$strComplexTypeArray['TableTransaction'] = TableTransaction::GetSoapComplexTypeXml();
				TableUserProject::AlterSoapComplexTypeArray($strComplexTypeArray);
				TableProject::AlterSoapComplexTypeArray($strComplexTypeArray);
				TableItemGet::AlterSoapComplexTypeArray($strComplexTypeArray);
				TablePointIn::AlterSoapComplexTypeArray($strComplexTypeArray);
				TablePointOut::AlterSoapComplexTypeArray($strComplexTypeArray);
				TableEscrow::AlterSoapComplexTypeArray($strComplexTypeArray);
			}
		}

		public static function GetArrayFromSoapArray($objSoapArray) {
			$objArrayToReturn = array();

			foreach ($objSoapArray as $objSoapObject)
				array_push($objArrayToReturn, TableTransaction::GetObjectFromSoapObject($objSoapObject));

			return $objArrayToReturn;
		}

		public static function GetObjectFromSoapObject($objSoapObject) {
			$objToReturn = new TableTransaction();
			if (property_exists($objSoapObject, 'Id'))
				$objToReturn->intId = $objSoapObject->Id;
			if ((property_exists($objSoapObject, 'User')) &&
				($objSoapObject->User))
				$objToReturn->User = TableUserProject::GetObjectFromSoapObject($objSoapObject->User);
			if ((property_exists($objSoapObject, 'Project')) &&
				($objSoapObject->Project))
				$objToReturn->Project = TableProject::GetObjectFromSoapObject($objSoapObject->Project);
			if ((property_exists($objSoapObject, 'ItemGet')) &&
				($objSoapObject->ItemGet))
				$objToReturn->ItemGet = TableItemGet::GetObjectFromSoapObject($objSoapObject->ItemGet);
			if ((property_exists($objSoapObject, 'PointIn')) &&
				($objSoapObject->PointIn))
				$objToReturn->PointIn = TablePointIn::GetObjectFromSoapObject($objSoapObject->PointIn);
			if ((property_exists($objSoapObject, 'PointOut')) &&
				($objSoapObject->PointOut))
				$objToReturn->PointOut = TablePointOut::GetObjectFromSoapObject($objSoapObject->PointOut);
			if ((property_exists($objSoapObject, 'Escrow')) &&
				($objSoapObject->Escrow))
				$objToReturn->Escrow = TableEscrow::GetObjectFromSoapObject($objSoapObject->Escrow);
			if (property_exists($objSoapObject, 'Currency'))
				$objToReturn->intCurrency = $objSoapObject->Currency;
			if (property_exists($objSoapObject, 'BalanceBefore'))
				$objToReturn->intBalanceBefore = $objSoapObject->BalanceBefore;
			if (property_exists($objSoapObject, 'BalanceAfter'))
				$objToReturn->intBalanceAfter = $objSoapObject->BalanceAfter;
			if (property_exists($objSoapObject, 'Amount'))
				$objToReturn->intAmount = $objSoapObject->Amount;
			if (property_exists($objSoapObject, 'TransactionDate'))
				$objToReturn->dttTransactionDate = new QDateTime($objSoapObject->TransactionDate);
			if (property_exists($objSoapObject, 'Type'))
				$objToReturn->intType = $objSoapObject->Type;
			if (property_exists($objSoapObject, 'Description'))
				$objToReturn->strDescription = $objSoapObject->Description;
			if (property_exists($objSoapObject, 'Active'))
				$objToReturn->strActive = $objSoapObject->Active;
			if (property_exists($objSoapObject, 'Ip'))
				$objToReturn->strIp = $objSoapObject->Ip;
			if (property_exists($objSoapObject, 'PointChargedId'))
				$objToReturn->strPointChargedId = $objSoapObject->PointChargedId;
			if (property_exists($objSoapObject, '__blnRestored'))
				$objToReturn->__blnRestored = $objSoapObject->__blnRestored;
			return $objToReturn;
		}

		public static function GetSoapArrayFromArray($objArray) {
			if (!$objArray)
				return null;

			$objArrayToReturn = array();

			foreach ($objArray as $objObject)
				array_push($objArrayToReturn, TableTransaction::GetSoapObjectFromObject($objObject, true));

			return unserialize(serialize($objArrayToReturn));
		}

		public static function GetSoapObjectFromObject($objObject, $blnBindRelatedObjects) {
			if ($objObject->objUser)
				$objObject->objUser = TableUserProject::GetSoapObjectFromObject($objObject->objUser, false);
			else if (!$blnBindRelatedObjects)
				$objObject->intUserId = null;
			if ($objObject->objProject)
				$objObject->objProject = TableProject::GetSoapObjectFromObject($objObject->objProject, false);
			else if (!$blnBindRelatedObjects)
				$objObject->intProjectId = null;
			if ($objObject->objItemGet)
				$objObject->objItemGet = TableItemGet::GetSoapObjectFromObject($objObject->objItemGet, false);
			else if (!$blnBindRelatedObjects)
				$objObject->intItemGetId = null;
			if ($objObject->objPointIn)
				$objObject->objPointIn = TablePointIn::GetSoapObjectFromObject($objObject->objPointIn, false);
			else if (!$blnBindRelatedObjects)
				$objObject->intPointInId = null;
			if ($objObject->objPointOut)
				$objObject->objPointOut = TablePointOut::GetSoapObjectFromObject($objObject->objPointOut, false);
			else if (!$blnBindRelatedObjects)
				$objObject->intPointOutId = null;
			if ($objObject->objEscrow)
				$objObject->objEscrow = TableEscrow::GetSoapObjectFromObject($objObject->objEscrow, false);
			else if (!$blnBindRelatedObjects)
				$objObject->intEscrowId = null;
			if ($objObject->dttTransactionDate)
				$objObject->dttTransactionDate = $objObject->dttTransactionDate->__toString(QDateTime::FormatSoap);
			return $objObject;
		}




	}



	/////////////////////////////////////
	// ADDITIONAL CLASSES for QCubed QUERY
	/////////////////////////////////////

	class QQNodeTableTransaction extends QQNode {
		protected $strTableName = 'table_transaction';
		protected $strPrimaryKey = 'id';
		protected $strClassName = 'TableTransaction';
		public function __get($strName) {
			switch ($strName) {
				case 'Id':
					return new QQNode('id', 'Id', 'integer', $this);
				case 'UserId':
					return new QQNode('user_id', 'UserId', 'integer', $this);
				case 'User':
					return new QQNodeTableUserProject('user_id', 'User', 'integer', $this);
				case 'ProjectId':
					return new QQNode('project_id', 'ProjectId', 'integer', $this);
				case 'Project':
					return new QQNodeTableProject('project_id', 'Project', 'integer', $this);
				case 'ItemGetId':
					return new QQNode('item_get_id', 'ItemGetId', 'integer', $this);
				case 'ItemGet':
					return new QQNodeTableItemGet('item_get_id', 'ItemGet', 'integer', $this);
				case 'PointInId':
					return new QQNode('point_in_id', 'PointInId', 'integer', $this);
				case 'PointIn':
					return new QQNodeTablePointIn('point_in_id', 'PointIn', 'integer', $this);
				case 'PointOutId':
					return new QQNode('point_out_id', 'PointOutId', 'integer', $this);
				case 'PointOut':
					return new QQNodeTablePointOut('point_out_id', 'PointOut', 'integer', $this);
				case 'EscrowId':
					return new QQNode('escrow_id', 'EscrowId', 'integer', $this);
				case 'Escrow':
					return new QQNodeTableEscrow('escrow_id', 'Escrow', 'integer', $this);
				case 'Currency':
					return new QQNode('currency', 'Currency', 'integer', $this);
				case 'BalanceBefore':
					return new QQNode('balance_before', 'BalanceBefore', 'integer', $this);
				case 'BalanceAfter':
					return new QQNode('balance_after', 'BalanceAfter', 'integer', $this);
				case 'Amount':
					return new QQNode('amount', 'Amount', 'integer', $this);
				case 'TransactionDate':
					return new QQNode('transaction_date', 'TransactionDate', 'QDateTime', $this);
				case 'Type':
					return new QQNode('type', 'Type', 'integer', $this);
				case 'Description':
					return new QQNode('description', 'Description', 'string', $this);
				case 'Active':
					return new QQNode('active', 'Active', 'string', $this);
				case 'Ip':
					return new QQNode('ip', 'Ip', 'string', $this);
				case 'PointChargedId':
					return new QQNode('point_charged_id', 'PointChargedId', 'string', $this);
				case 'TableBankRequestInAsTransaction':
					return new QQReverseReferenceNodeTableBankRequestIn($this, 'tablebankrequestinastransaction', 'reverse_reference', 'transaction_id');
				case 'TableBankRequestInAsProcessTransaction':
					return new QQReverseReferenceNodeTableBankRequestIn($this, 'tablebankrequestinasprocesstransaction', 'reverse_reference', 'process_transaction_id');
				case 'TableBankRequestOutAsTransaction':
					return new QQReverseReferenceNodeTableBankRequestOut($this, 'tablebankrequestoutastransaction', 'reverse_reference', 'transaction_id');
				case 'TableBankRequestOutAsProcessTransaction':
					return new QQReverseReferenceNodeTableBankRequestOut($this, 'tablebankrequestoutasprocesstransaction', 'reverse_reference', 'process_transaction_id');

				case '_PrimaryKeyNode':
					return new QQNode('id', 'Id', 'integer', $this);
				default:
					try {
						return parent::__get($strName);
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
			}
		}
	}

	class QQReverseReferenceNodeTableTransaction extends QQReverseReferenceNode {
		protected $strTableName = 'table_transaction';
		protected $strPrimaryKey = 'id';
		protected $strClassName = 'TableTransaction';
		public function __get($strName) {
			switch ($strName) {
				case 'Id':
					return new QQNode('id', 'Id', 'integer', $this);
				case 'UserId':
					return new QQNode('user_id', 'UserId', 'integer', $this);
				case 'User':
					return new QQNodeTableUserProject('user_id', 'User', 'integer', $this);
				case 'ProjectId':
					return new QQNode('project_id', 'ProjectId', 'integer', $this);
				case 'Project':
					return new QQNodeTableProject('project_id', 'Project', 'integer', $this);
				case 'ItemGetId':
					return new QQNode('item_get_id', 'ItemGetId', 'integer', $this);
				case 'ItemGet':
					return new QQNodeTableItemGet('item_get_id', 'ItemGet', 'integer', $this);
				case 'PointInId':
					return new QQNode('point_in_id', 'PointInId', 'integer', $this);
				case 'PointIn':
					return new QQNodeTablePointIn('point_in_id', 'PointIn', 'integer', $this);
				case 'PointOutId':
					return new QQNode('point_out_id', 'PointOutId', 'integer', $this);
				case 'PointOut':
					return new QQNodeTablePointOut('point_out_id', 'PointOut', 'integer', $this);
				case 'EscrowId':
					return new QQNode('escrow_id', 'EscrowId', 'integer', $this);
				case 'Escrow':
					return new QQNodeTableEscrow('escrow_id', 'Escrow', 'integer', $this);
				case 'Currency':
					return new QQNode('currency', 'Currency', 'integer', $this);
				case 'BalanceBefore':
					return new QQNode('balance_before', 'BalanceBefore', 'integer', $this);
				case 'BalanceAfter':
					return new QQNode('balance_after', 'BalanceAfter', 'integer', $this);
				case 'Amount':
					return new QQNode('amount', 'Amount', 'integer', $this);
				case 'TransactionDate':
					return new QQNode('transaction_date', 'TransactionDate', 'QDateTime', $this);
				case 'Type':
					return new QQNode('type', 'Type', 'integer', $this);
				case 'Description':
					return new QQNode('description', 'Description', 'string', $this);
				case 'Active':
					return new QQNode('active', 'Active', 'string', $this);
				case 'Ip':
					return new QQNode('ip', 'Ip', 'string', $this);
				case 'PointChargedId':
					return new QQNode('point_charged_id', 'PointChargedId', 'string', $this);
				case 'TableBankRequestInAsTransaction':
					return new QQReverseReferenceNodeTableBankRequestIn($this, 'tablebankrequestinastransaction', 'reverse_reference', 'transaction_id');
				case 'TableBankRequestInAsProcessTransaction':
					return new QQReverseReferenceNodeTableBankRequestIn($this, 'tablebankrequestinasprocesstransaction', 'reverse_reference', 'process_transaction_id');
				case 'TableBankRequestOutAsTransaction':
					return new QQReverseReferenceNodeTableBankRequestOut($this, 'tablebankrequestoutastransaction', 'reverse_reference', 'transaction_id');
				case 'TableBankRequestOutAsProcessTransaction':
					return new QQReverseReferenceNodeTableBankRequestOut($this, 'tablebankrequestoutasprocesstransaction', 'reverse_reference', 'process_transaction_id');

				case '_PrimaryKeyNode':
					return new QQNode('id', 'Id', 'integer', $this);
				default:
					try {
						return parent::__get($strName);
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
			}
		}
	}

?>